Mass virtual hosting

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

Is it posiible to use something like Apache’s mod_vhost_alias
(mod_vhost_alias - Apache HTTP Server) 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-----

On Wednesday 28 November 2007, Bart³omiej Syryjczyk wrote:

access_log /var/log/nginx/access_$server_name.log;

access_log dosn’t support variables

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

Roxis pisze:

access_log dosn’t support variables
I know, but maybe someone thinking about mass virtual hosting via nginx
at another way?


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

iD8DBQFHdtaNt25UBlJ9LC4RAs2dAJ9R+cpGQ1DJ/plSzYjdgdDMjrmBWQCfT+lX
Qqw+LDKccKC/+B7yCIdlzBg=
=++4K
-----END PGP SIGNATURE-----

Bartłomiej Syryjczyk wrote:

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

Roxis pisze:

access_log dosn’t support variables
I know, but maybe someone thinking about mass virtual hosting via nginx
at another way?

this team is great :wink: www.nginxhosting.com