In the implementation of the Apache and Tomcat integration to achieve dynamic static resource separation is a problem, when the request by the Apache 80 port for listening processing, the page elements, the format is a lot of loss, and the 8080 port of Tomcat to handle the time there is no problem. After thinking open chrome debugging, found that the requested resources including pictures, CSS, JS, the response code is all 403, which should be the Apache permissions have a problem, and finally modified the permissions of the resource path to solve the problem. Combined with the online information and their own actual situation summarized the following common reasons:
- Since the default site path for the Apache configuration file has been modified, there is no permission to modify the path
Workaround, find the location of the modified path in the configuration file, and modify the configuration file to the following format:
" Your_path "> Options Indexes followsymlinks allowoverride None Order allow,deny allow from all </Directory>
- The file is not in the site directory, that is, the path is incorrect
Workaround: Check the input path for errors and whether the page you are accessing exists.
- Apache user has no site path access rights
View the owner of the site path and discover that the owning user and user group are root
[Email protected] webapps]#ls-Latotal352864drwxr-xr-x.6Root root theMay the -: .. DRWXR-xr-x.3Root root inMay the the: - .. DRWXR-X---. OneRoot root4096May - Geneva: -FTMS-rw-r--r--.1Root root72365363May - Geneva: -FTMS.WARDRWXR-X---.3Root root4096May the -: -ROOT
Apache Users and user groups found in Apache configuration files are Apache
# user/group:the name (or #number)of the user/for # running httpd, as with most system services. #Us ER apachegroup Apache
The site Directory requires Apache users to have access, so the ownership of the directory is changed to Apache
Workaround: Go to the Site Directory, modify permissions
[Email protected] webapps]#Chown-R Apache:apache. [Email protected] webapps]#ls-Latotal352864drwxr-xr-x.6Apache Apache theMay the -: .. DRWXR-xr-x.3Root root inMay the the: - .. DRWXR-X---. OneApache Apache4096May - Geneva: -FTMS-rw-r--r--.1Apache Apache72365363May - Geneva: -FTMS.WARDRWXR-X---.3Apache Apache4096May the -: -ROOT
Some of this type of problem can be solved by the above method.
CentOS under the Apache integrated Tomcat Access report Forbidden 403 Error resolution method