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.
- Enable mod proxy and mod http_proxy with:
sudo a2enmod proxysudo a2enmod http_proxy - Create a blank virtual host in your sites-available:
sudo touch /etc/apache2/sites-available/neatserver - Open the virtual server (i use ssh into a graphical desktop – it allows copy & paste!):
sudo nano /etc/apache2/sites-available - 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 OffOrder deny,allow
Allow from allProxyPass / http://192.168.1.101/
ProxyPassReverse / http://192.168.1.101/
- enable the site in apache
sudo a2ensite neatserver - 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
No Comments so far ↓
There are no comments yet...Kick things off by filling out the form below.