huanix

chown -R huanix /

huanix header image 2

mod proxy redirect url to a backend server on a lan on apache2 and ubuntu gutsy

October 27th, 2007 · No Comments · Uncategorized

I will not lie. I struggled for the better part of 3 hours trying to get my virtualhost set properly to allow me to redirect incoming internet traffic from my main server to a server on my lan, all using port 80. Here’s what worked for me.

  1. Enable mod proxy and mod http_proxy with: sudo a2enmod proxysudo a2enmod http_proxy
  2. Create a blank virtual host in your sites-available:
    sudo touch /etc/apache2/sites-available/neatserver
  3. Open the virtual server (i use ssh into a graphical desktop – it allows copy & paste!):
    sudo nano /etc/apache2/sites-available
  4. here’s the virutal host info (note: this is my WHOLE virtual host for this site on the forwarding server!):
    NameVirtualHost *

    ServerName www.neatserver.com
    DocumentRoot /var/www/neatserver
    ProxyRequests Off

    Order deny,allow
    Allow from all

    ProxyPass / http://192.168.1.101/
    ProxyPassReverse / http://192.168.1.101/

  5. enable the site in apache
    sudo a2ensite neatserver
  6. Restart Apache, and it Should (might) work!
    sudo apache2 -k restart

Incoming search terms:

  • mod proxy redirect
  • mod_proxy redirects to local lan
  • mod http_proxy
  • redirecting url from a user to local server on lan
  • redirect to local network in apache
  • redirect some urls to backend apache
  • redirect mod proxy to local server
  • redirect mod login to backend
  • apache proxy redirect to lan server
  • mod_proxy lan server

Tags:

No Comments so far ↓

There are no comments yet...Kick things off by filling out the form below.

Leave a Comment