server {<div> server_name <a href="http://example.com">example.com</a> <a href="http://vhost1.example.com">vhost1.example.com</a> <a href="http://vhost2.example.com">vhost2.example.com</a>;</div><div> proxy_pass <a href="http://localhost:8080">http://localhost:8080</a>;<br>
<div>}<br><br><div class="gmail_quote">On Fri, Aug 27, 2010 at 00:37, khine <span dir="ltr"><<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
hello, what is the way to convert this apache vhost directive to nginx?<br>
[code]<br>
<br>
ServerName <a href="http://example.com" target="_blank">example.com</a><br>
ServerAlias <a href="http://vhost1.example.com" target="_blank">vhost1.example.com</a><br>
ServerAlias <a href="http://vhost2.example.com" target="_blank">vhost2.example.com</a><br>
RewriteEngine On<br>
RewriteRule ^/(.*) <a href="http://localhost:8080/$1" target="_blank">http://localhost:8080/$1</a> [P]<br>
<br>
[/code]<br>
<br>
also is there a way to read a list of ServerAlias'es dynamically, for<br>
example from a python list, ['<a href="http://vhost1.example.com" target="_blank">vhost1.example.com</a>',<br>
'<a href="http://vhost2.example.com" target="_blank">vhost2.example.com</a>'...]<br>
<br>
thanks<br>
<br>
norman<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,124052,124052#msg-124052" target="_blank">http://forum.nginx.org/read.php?2,124052,124052#msg-124052</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br><div>wbr, Kirill</div><br>
</div></div>