Getting Error 403 (Forbidden) When Sending an SSL Request from Apache Server to Tomcat

I am using Apache (httpd) on my CentOS and have deployed the Java / Struts web application on Tomcat6.
I am forwarding requests between Apache Tomcat using Mod_JK.
In order to do this job on SSL, I completed this question on the stack in order to configure httpd.conf, mod_jk.conf.
This works fine for the same web application when I called it using HTTP.
However, through HTTPS I get error 403. When I looked at the logs, I found the following entry

The directory index is prohibited by the Options directive: / var / lib / tomcat6 / webapps / myapp /, referer: https://my domain IP

I tried setting up the directory in httpd.conf as shown below, but getting the same error

 <Directory "/var/lib/tomcat6/webapps/<myapp>"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> 

Please note that I have not made any changes to Tomcat Server.xml yet.
Any help.

Edit:
I created dummy index.html and saved it in the root folder of the application.
Then I requested the same URL from a web browser via HTTPS, guess what? I can see my index.html. However, HTTP is working correctly.
Now can someone tell me how I can direct apache so as not to search for any index.html , but redirect the request to tomcat directly.

Edit-2: When I tried to change the directory settings to "Indexes FollowSymLinks Includes ExecCGI", it started displaying directory listings.

+1
source share
1 answer

The ssl.conf file is present in the conf.d HTTPD folder. Have you seen this file too?
This file (if present) has a higher priority than the one written in the httpd.conf file.
See if you have been provided with virtual host settings for this file or if incorrect settings are written to this file. You can also check by commenting on your virtual host present in the httpd.conf file, and check if the 403 error has gone. If so, then make sure Apache loads the settings from another file. If error 404 occurs, then other functions may be installed.

+1
source

Source: https://habr.com/ru/post/1384941/


All Articles