All posts All posts by this author Paper color Change page color Announcements

Apache reverse proxy settings in Ubuntu

Required modules:

Enable the following modules

$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2enmod vhost_alias
$ sudo a2enmod rewrite

Apache configuration:

<VirtualHost *:80>
    DocumentRoot /home/username/public_html
    ServerName example.com
    RewriteEngine on
    ProxyPass / http://server_name.com/ connectiontimeout=5 timeout=60
    ProxyPassReverse / http://server_name.com/
    ProxyRequests Off
</VirtualHost>

Restart Apache:

$ sudo service apache2 restart
Software Solutions