
This work is licensed under a Creative Commons Attribution-Share Alike 2.0 France License.
What if you want to hide an internal server ? you need to configure apache to act as a reverse Proxy. This is the small snippet you need to configure a proxy pass on the public server. Everything is well known expect (for me at least) the directive ProxyPreserveHost that is needed to rewrite the HTTP_SERVER parameter for the hidden server.
vlogger [1] is a nice piece of software to deal with large number of virtual hosts. It is meant to work with apache by piping the logs to the vlogger process that will then take care of storing them in you log directory.
I found an excellent howto that describes how to install vlogger in debian [2] .
To better integrate it with webalizer you can use this small bash snippet to generate conf files automatically for all your vhosts. This assumes that your log files are stored in /var/log/apache2 and that you don't have any other directories there but those generated by vlogger.
I've been looking for a solution to this problem for a long time. Basically apache2 is not able to do name-based virtual hosting if you also want to use ssl. The reason for this problem is very simple. In order to know then hostname, apache2 I need to establish a secure channel, but to establish a secure channel, if I have more then one virtual host, then I need to know the hostname, that is, to provide the client the correct certificate. There is also a better explanation on the apache website [1].
There correct solution to this problem is to use the TLS extension called SNI [2].
A quick one about mod_rewrite. I added ssl to cduce.org for our user pages. However I've no use of ssl to serve our static pages. This rule will redirect all https requests (^443$) that are not related to userdirs (!^/~) to http:// .
RewriteEngine on
RewriteCond %{SERVER_PORT} ^443$
RewriteCond %{REQUEST_URI} !^/~
RewriteRule ^(.*)$ http://www.cduce.org$1 [L,R]
Recent comments
49 weeks 6 days ago
1 year 1 week ago
1 year 14 weeks ago
1 year 16 weeks ago
1 year 18 weeks ago
1 year 20 weeks ago
1 year 22 weeks ago
1 year 51 weeks ago
2 years 3 weeks ago