Error 403 Forbidden - permissions on apache2, tomcat6, mod_proxy

I'm not a complete beginner and regret posting an ambiguous question that has been posted in so many different forms in so many ways. Anyway, I get this error:

Forbidden You don't have permission to access / on this server. Apache/2.2.14 (Ubuntu) Server at gookie.localhost Port 80 

I have apache2 tomcat6 proxy. here are the details:

  • The tomcat installation is located in / home / ae 1 / lib / java / apache-tomcat-6.0.29
  • ln -s / home / ae1 / lib / java / apache-tomcat-6.0.29 / var / www / tomcat6
  • http.conf:

 <Directory "/var/www/tomcat6/webapps/springapp"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> 
  • / etc / hosts has this entry: 127.0.0.1 localhost gookie.localhost
  • /etc/apache2/sites-available/gookie.localhost.conf

 <VirtualHost *:80 > ServerName gookie.localhost DocumentRoot /var/www/tomcat6/webapps/springapp DirectoryIndex index.jsp index.html index.htm index.php ProxyPass / http://localhost:8080/springapp ProxyPassReverse / http://localhost:8080/springapp </VirtualHost> <Directory "/home/www/tomcat6/webapps/springapp"> Options +Indexes FollowSymLinks +ExecCGI AllowOverride AuthConfig FileInfo Order allow,deny Allow from all </Directory> 
  • the file / var / www / tomcat 6 / conf / server.xml has:

 <Connector port="8080" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" proxyName="gookie.localhost" /> 

I had proxyPort="80" in server.xml and still have no luck.

Any thoughts on this?

+7
source share
2 answers

The solution is to have this in the file / etc / apache 2 / mods-enabled / proxy.conf:

 <IfModule mod_proxy.c> ProxyRequests Off <Proxy *> AddDefaultCharset off Order deny,allow Allow from all </Proxy> </IfModule> 
+16
source

step1. You need to open the file name "phpmyadmin.conf". This is the phpmyadmin configuraiton configuration file. where you need to copy the code.

 <Directory "c:/wamp/apps/phpmyadmin3.4.5/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Deny from all Allow from 127.0.0.1 

Replace code

 <Directory "c:/wamp/apps/phpmyadmin3.4.5/"> Options Indexes FollowSymLinks MultiViews AllowOverride all Order Deny,Allow Allow from all 

Step2. Now you need to open another file - the Apache file "httpd.conf" . This is also your Apache configuration file. You can find this file in the section "C: \ wamp \ bin \ apache \ Apache2.2.21 \ conf \" This path again depends on the installation directory of your Wamp server. In this file you need to change the code. First search for this code "# online tag - do not delete" You have probably found this code in the middle of the file. And then remove “Allow from 127.0.0.1” and replace “Deny from everyone” with Allow from all “ And yes, if possible, create a unique password for your“ phpmyadmin ”so that it is not accessible to the outsider (ignore if you use local machine).

-5
source

All Articles