Apache can handle any web server application which running on different port using its own http port
Apache uses mod_proxy to implement a proxy/cache for Apache. It implements proxying capability for FTP
, CONNECT
(for SSL), HTTP/0.9
, HTTP/1.0
, and (as of Apache 1.3.23) HTTP/1.1
. The module can be configured to connect to other proxy modules for these and other protocols.
Imagine you have a webserver application running 5566. You need to access this application using apcache port 80. You can follow this steps
- Install proxy modules for apache, if it is not installed
# aptitude install libapache2-mod-proxy-html
- Enable proxy modules for apache
Change to directory /etc/apache2/mods-available and enable module
# a2enmod proxy
Reload apache service
# invoke-rc.d apache2 reload
- Create a new apache virtual host to access web server application using mod_proxy
Here is I am including a virtualhost configuration to access a webserver which running on port 5566 using apache port 80
<VirtualHost *:80>
ServerName example.org
ServerAlias www.example.org
ProxyRequests Off
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
ProxyPass / http://localhost:5566/
ProxyPassReverse / http://localhost:5566/
<Location />
Order allow,deny
Allow from all
</Location>
</VirtualHost>