Skip to content
Advertisement

Provision headers are shown error in google chrome when using apache virtual host

I have to tomcat servers running in my server. And I wanted to do a virtual host routing. So initially I tried it with one tomcat which is running in 8081 port and ajp port enabled to 8011 in the tomcat server.xml file

My conf file in the /etc/apache2/sites-available/mydomain_name.com.conf looks likes this

<VirtualHost *:80>


    ProxyRequests off
    ProxyPreserveHost On
    ServerName mydomain_name.com

    ServerAdmin ubuntu@mydomain_name.com

    ProxyPass /       ajp://localhost:8011/
    ProxyPassReverse / ajp://localhost:8011/

</VirtualHost>

Then I did

sudo a2ensite mydomain_name.com.conf
sudo service apache reload

Every thing went find, no issues. And I also ensured the port 8011 is listening. But when I try to access the server from my personal laptop, the request is blocked by Google chrome. enter image description here

I have enabled these configurations in the server too.

sudo a2enmod proxy
sudo a2enmod proxy_ajp
sudo  a2enmod proxy_http
sudo service apache2 restar

Have anyone has came across this issue ? Shedding some light would be really helpful. Because I have done some thing similar 1 year back, then this issue did not occur, and I’m only trying to direct it to the tomcat home page. Which is a bare minimal page.

Advertisement

Answer

After several frustrating hours found the issue. Hope this might help if any one came across this same issue.

Although the port 80 was opened via the aws management console security groups, internally the ports were firewall protected by the ip tables. So by removing the ip-tables entry for the port 80 I was able to make the virtual host work.

Advertisement