mass virtual hosting

Bartłomiej Syryjczyk guzik at anka.net.pl
Wed Nov 28 17:36:05 MSK 2007


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Is it posiible to use something like Apache's mod_vhost_alias
(http://httpd.apache.org/docs/2.0/mod/mod_vhost_alias.html) in nginx?
I want to define separately root, location and access_log (and possibly
auth_basic_user_file) directives per domain. Variable $server_name works
only in root. Of course I don't want to use file per domain.
Interpolation like %N.M will be fine too.
Example:
- ---
server {
[...]
  server_name nginx _;
  access_log /var/log/nginx/access_$server_name.log;
[...]
  root /srv/www/$server_name;
[...]
}
- ---

- --
Bartłomiej Syryjczyk
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFHTXzVt25UBlJ9LC4RAk7sAJ0RsI3yRx+zxybUIG7CrySXhZpaOQCdHEQK
U8P6s0RXQhBJoghzLGt40C0=
=ygbV
-----END PGP SIGNATURE-----





More information about the nginx mailing list