apache to nginx rewrite rule.

khine nginx-forum at nginx.us
Fri Aug 27 00:37:14 MSD 2010


hello, what is the way to convert this apache vhost directive to nginx?
[code]

  ServerName example.com
  ServerAlias vhost1.example.com
  ServerAlias vhost2.example.com
  RewriteEngine On
  RewriteRule ^/(.*) http://localhost:8080/$1 [P]

[/code]

also is there a way to read a list of ServerAlias'es dynamically, for
example from a python list, ['vhost1.example.com',
'vhost2.example.com'...]

thanks

norman

Posted at Nginx Forum: http://forum.nginx.org/read.php?2,124052,124052#msg-124052




More information about the nginx mailing list