You should set a serverwide index directive. You should move index index.shtml index.php; from location / {} to server {}<div><br></div><div>Also your rewrite rule rewrite ^(.+) <a href="http://www.example.com/" target="_blank">http://www.example.com</a>$1 permanent; sould be rewritten into rewrite ^ <a href="http://www.example.com/" target="_blank">http://www.example.com</a>$request_uri? permanent;</div>
<div><br></div><div>Take a look at <a href="http://wiki.nginx.org/Pitfalls">http://wiki.nginx.org/Pitfalls</a><br><div><br><br><div class="gmail_quote">On Sat, Sep 3, 2011 at 11:17, Ian Evans <span dir="ltr"><<a href="mailto:ianevans@digitalhit.com">ianevans@digitalhit.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Been scratching my head on this one all night.<br>
<br>
Been working on it a bit and now if I go to:<br>
<a href="https://www.example.com/myfacebookapp/index.shtml" target="_blank">https://www.example.com/<u></u>myfacebookapp/index.shtml</a> the page loads but <a href="https://www.example.com/myfacebookapp" target="_blank">https://www.example.com/<u></u>myfacebookapp</a> is tossing a 404<br>

<br>
I'm really boggled here because the other subdirs are woring and the only difference is they're password protected.<br>
<br>
Here's the full ssl server conf section:<br>
<br>
server {<br>
server_name <a href="http://www.example.com" target="_blank">www.example.com</a>;<br>
listen 443;<br>
root /usr/local/apache/htdocs/;<br>
<br>
ssl on;<br>
ssl_certificate /usr/local/apache/conf/server.<u></u>pem;<br>
ssl_certificate_key /usr/local/apache/conf/server.<u></u>key;<br>
ssl_session_timeout 5m;<br>
error_page 404 /dhe404.shtml;<br>
<br>
location / {<br>
rewrite ^(.+) <a href="http://www.example.com" target="_blank">http://www.example.com</a>$1 permanent;<div class="im"><br>
index index.shtml index.php;<br>
}<br>
                <br>
location ~ \.(shtml|php|inc)$ {<br></div><div class="im">
include /usr/local/nginx/conf/fastcgi-<u></u>php.conf;<br>
fastcgi_pass <a href="http://127.0.0.1:10004" target="_blank">127.0.0.1:10004</a>;<br>
}<br>
        <br></div>
location ^~ /myfacebookapp/ {<div class="im"><br>
fastcgi_intercept_errors on;<br>
include /usr/local/nginx/conf/fastcgi-<u></u>php.conf;<br>
fastcgi_pass <a href="http://127.0.0.1:10004" target="_blank">127.0.0.1:10004</a>;<br>
fastcgi_param HTTPS on;<br>
}<br>
<br></div>
location ^~ /subdir2/ {<br>
index index.php;<div class="im"><br>
fastcgi_intercept_errors on;<br>
include /usr/local/nginx/conf/fastcgi-<u></u>php.conf;<br>
fastcgi_pass <a href="http://127.0.0.1:10004" target="_blank">127.0.0.1:10004</a>;<br></div>
fastcgi_index index.php;<br>
fastcgi_param HTTPS on;<br>
}<br>
<br>
location ^~ /subdir3/ {<div class="im"><br>
fastcgi_intercept_errors on;<br>
include /usr/local/nginx/conf/fastcgi-<u></u>php.conf;<br>
fastcgi_pass <a href="http://127.0.0.1:10004" target="_blank">127.0.0.1:10004</a>;<br>
fastcgi_param HTTPS on;<br></div>
auth_basic "example";<br>
auth_basic_user_file /usr/local/apache/passwd/<u></u>passwords;<br>
}<br>
<br>
location /subdir4/ {<br>
index index.shtml index.php index.html;<br>
auth_basic "example";<br>
auth_basic_user_file /usr/local/apache/passwd/<u></u>passwords;<br>
}<br>
<br>
location /subdir5/ {<br>
index index.html;<br>
auth_basic "example";<br>
auth_basic_user_file /usr/local/apache/passwd/<u></u>passwords;<br>
}<br>
<br>
location ~* ^.+\.(png|gif)$ {<br>
expires off;<br>
}<br>
<br>
# serve static files directly<br>
location ~* ^.+.(css|gif|jpe?g|bmp|js|png|<u></u>ico)$ {<br>
expires 30d;<div><div></div><div class="h5"><br>
}<br>
<br>
}<br>
<br>
<br>
______________________________<u></u>_________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org" target="_blank">nginx@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx" target="_blank">http://mailman.nginx.org/<u></u>mailman/listinfo/nginx</a><br>
</div></div></blockquote></div><br></div></div>