Changes

Jump to: navigation, search

Shared webhosting

538 bytes added, 19:42, 28 February 2007
Proxy webserver
=== Proxy webserver ===
Because we have only one public IP-address, we need an trick to access every minimal server based on the hostname in the HTTP request. For SSH we used different ports, but that is not an option for websites. Again we create an VEx with an internal IP-address. On this server we install Lighttpd as well, because the proxying is very simple. If someone has an working example with Apache, please add. First we must forward port 80 to this server:
<pre>
You can map more names to the same IP-address if needed. The last step is to add mod_proxy to the server.modules section.
 
For apache add a VirtualHost directive
 
<pre>
<VirtualHost external-IP-address:80>
ServerName mydomainnameishere.com
RewriteEngine On
RewriteRule ^(.*)$ http://192.168.2.101$1 [P]
RewriteRule ^(.*)$ http://mydomainnameishere.com$1 [P]
</VirtualHost>
 
<VirtualHost external-IP-address:80>
ServerName mydomainnameishere.com
RewriteEngine On
RewriteRule ^(.*)$ http://192.168.2.101$1 [P]
RewriteRule ^(.*)$ http://www.mydomainnameishere.com$1 [P]
</VirtualHost>
</pre>
=== Other applications ===

Navigation menu