Nginx Agent Java Project access Share link 404

Source: Internet
Author: User

Today configuration items, because static resources need to be shared, create a shared directory to do static resources, and then Java static path reference a soft link, access 404

1. Project Resource path:

Total 12drwxr-x---3 root root 4096 2 14:12 meta-infdrwxr-x---2 root root 4096 May 2 14:12 sdweblrwxrwxrwx 1 ng Inx Nginx 2 15:15 Static-/var/ckl/static/drwxr-x---5 root root 4096 May 2 14:12 Web-inf

Link as shared static resource

2. Access error 404 to resolve:

Configuring Tomcat's Context.xml

<?xml version= "1.0"  encoding= "UTF-8"?><!--  licensed to the apache  Software Foundation  (ASF)  under one or more  contributor  license agreements.  see the notice file distributed with   this work for additional information regarding copyright ownership.   The ASF licenses this file to You under the Apache  license, version 2.0   (the  "License");  you may not use this  file except in compliance with  the license.  you may  obtain a copy of the license at      http:// Www.apache.org/licenses/LICENSE-2.0  Unless required by applicable law or  agreed to in writing, software  distributed under the license is  distributed on an  "As is"  BASIS,  WITHOUT WARRANTIES OR  Conditions of any kind, either express or implied.  see the  License for the specific language governing permissions and   limitations under the License.--><!-- the contents of this  file will be loaded for each web application --><context >    <resources allowlinking= "true"  />  //Add this line      <!-- default set of monitored resources. if one of  these changes, the    -->    <!-- web  Application will be reloaded.                                    -- >    <WatchedResource>WEB-INF/web.xml</WatchedResource>     <WatchedResource>${catalina.base}/conf/web.xml</WatchedResource>    < !-- Uncomment this to disable session persistence across Tomcat  restarts -->    <!--    <manager pathname= ""  / >    --></Context>

3. Restart the Tomcat solution

Nginx Agent Java Project access Share link 404

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.