Ignore all of the regex's for now, they were left over from a previous developer who configured the instance. I'll remove them.<div><br></div><div>My biggest concern though is around what the address(s) should be for <span style>devmode-secure. What should that look like in the config if the IP plus 443 causes it to loopback to nginx?</span></div>
<div><font color="#500050" face="arial, sans-serif"><br></font></div><div><font color="#500050" face="arial, sans-serif">Thanks for your help.</font></div><div><font color="#500050" face="arial, sans-serif">Karl<br></font><br>
<div class="gmail_quote">On Thu, Jan 12, 2012 at 5:29 PM, Valentin V. Bartenev <span dir="ltr"><<a href="mailto:ne@vbart.ru">ne@vbart.ru</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Thursday 12 January 2012 22:30:43 Karl Johnson wrote:<br>
[...]<br>
<div class="im">> ^.+.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|txt|tar|mi<br>
> d|midi|wav|bmp|rtf|ttf|woff|svg|eot)$ {<br>
>         root   /var/www/dev/public/;<br>
>                 expires           10y;<br>
>                 add_header Cache-Control public;<br>
>         }<br>
> location ~ ^(/javascripts/.*)$ {<br>
>         root   /var/www/dev/public/;<br>
>                 expires           10y;<br>
>                 add_header Cache-Control public;<br>
>         }<br>
<br>
</div>Why did you put regexp captures everywhere and don't use them?<br>
<div class="im"><br>
><br>
>  if (-f $request_filename/index.html) {<br>
>         rewrite (.*) $1/index.html break;<br>
>       }<br>
>       if (-f $request_filename.html) {<br>
>         rewrite (.*) $1.html break;<br>
>       }<br>
>       if (!-f $request_filename) {<br>
>         proxy_pass <a href="http://developmentmode" target="_blank">http://developmentmode</a>;<br>
>         break;<br>
>       }<br>
<br>
</div>It's ugly. Please read:<br>
<a href="http://wiki.nginx.org/IfIsEvil" target="_blank">http://wiki.nginx.org/IfIsEvil</a><br>
<a href="http://wiki.nginx.org/Pitfalls" target="_blank">http://wiki.nginx.org/Pitfalls</a><br>
<br>
..and use the "try_files" directive:<br>
<a href="http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files" target="_blank">http://nginx.org/en/docs/http/ngx_http_core_module.html#try_files</a><br>
<br>
[...]<br>
<div class="im">> }<br>
> }<br>
> server {<br>
> listen 443;<br>
> server_name <a href="http://govenga.com" target="_blank">govenga.com</a> <a href="http://www.govenga.com" target="_blank">www.govenga.com</a>;<br>
</div>[...]<br>
> proxy_pass <a href="https://devmode-secure" target="_blank">https://devmode-secure</a>;<br>
[...]<br>
<br>
and above:<br>
<div class="im"><br>
><br>
> upstream devmode-secure{<br>
> server <a href="http://127.0.0.1:443" target="_blank">127.0.0.1:443</a>;<br>
> }<br>
><br>
<br>
</div>...looks like you set up a loopback proxy pass to nginx itself.<br>
<br>
<br>
wbr, Valentin V. Bartenev<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br></div>