<div class="gmail_quote">On 28 May 2011 15:55, pk899 <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;">
Thanks. But I am a bit confused, as the simple setup is not working from<br>
port 81 (for testing):<br>
<br>
<br>
server {<br>
listen 81;<br>
server_name MYDOMAIN.com <a href="http://www.MYDOMAIN.com" target="_blank">www.MYDOMAIN.com</a>;<br>
<br>
location ^~ /site/static {<br>
root /home/MYDOMAIN/www/static;<br>
index index.htm index.php;<br>
expires 30d;<br>
gzip on;<br>
}<br>
<br>
location / {<br>
proxy_pass <a href="http://127.0.0.1:80/" target="_blank">http://127.0.0.1:80/</a>;<br>
proxy_redirect off;<br>
<div class="im"><br>
proxy_set_header Host $host;<br>
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>
}<br>
<br>
}<br>
<br></div></blockquote><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">server {<br> listen 81;<br> server_name<span class="Apple-style-span" style="font-family: arial; font-size: small; border-collapse: separate; "> MYDOMAIN.com <a href="http://www.mydomain.com/" target="_blank">www.MYDOMAIN.com</a>;</span><br>
<br> root <span class="Apple-style-span" style="font-family: arial; font-size: small; border-collapse: separate; ">/home/MYDOMAIN/www</span>;<br><br> location / {<br> proxy_pass <a href="http://127.0.0.1/" target="_blank" style="color: rgb(0, 0, 204); ">http://127.0.0.1</a>:80;<br>
proxy_set_header Host $host;<br> proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br> }<br><br> location <span class="Apple-style-span" style="font-family: arial; font-size: small; border-collapse: separate; ">/static/</span> {</span></div>
<div class="gmail_quote"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "><span class="Apple-style-span" style="font-family: arial; font-size: small; border-collapse: separate; "> index index.htm;</span></span></div>
<div class="gmail_quote"><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; "> expires 30d;<br> gzip on;<br> gzip_static on;<br>
}<br><br></span><div><span class="Apple-style-span" style="border-collapse: collapse; font-family: arial, sans-serif; font-size: 13px; ">}</span> </div></div>