jump to navigation

Apache Reverse Proxy to VirtualHost- Centos 25 October 2010

Posted by Maulvi Bakar in : Linux , add a comment

This is a classic ones. I first encountered this, apply it and forgotten about it.

Always – always – always remember to specify into “/etc/httpd/conf/httpd.conf” the option below –

NameVirtualHost *:80

Then, create the individual “VirtualHost” entries either within the httpd.conf or as separate entries in “/etc/httpd/conf.d/”

ServerAdmin webmaster@dummy-host.example.com
DocumentRoot /www/docs/dummy-host.example.com
ProxyPass / http://x.x.x.x:8080
ProxyPassReverse / http://x.x.x.x:8080
ServerName dummy-host.example.com
ErrorLog logs/dummy-host.example.com-error_log
CustomLog logs/dummy-host.example.com-access_log common