Apache to nginx rewrite rule

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


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

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

server {
server_name example.com vhost1.example.com vhost2.example.com;
proxy_pass http://localhost:8080;
}

great, thanks

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