Understanding URL rewrite in sites-available

ashrobertent nginx-forum at nginx.us
Sat Oct 2 05:45:31 MSD 2010


Even more confused.... I commented out my entire default file except
server {} and IT STILL LOADS the index.php file WITH the PHP fast
CGI??!!!  So basically my default file was doing NOTHING.

My current file:
CAPS ARE MY PRIVATE VALUES with the EXEPCTION of SCRIPT_FILENAME which
appears to be a constant or variable

server {
   listen 90;
# server_name SERVER
# access_log PATH_TO_LOG
# error_log PATH_TO_LOG
# root /var/www;
# index index.php index.html
# rewrite_log on;
# if ($request_ur ~* ^(/welcome(/index)?|index(.php)/?$))
# {
#    rewrite ^(.*)$ / permanent;
# }
# if ($request_uri ~* index/?$)
# {
#    rewrite ^/(.*)/index?$ /$1 permanent;
# }
# if (!-d $request_filename)
# {
#     #some sites use * and some use + what is the difference?
#    rewrite ^/(.+)/$ /$1 permanent;
# }
# if (!-d $request_uri ~* ^/system)
# {
#   rewrite ^/(.*)$ /index.php?/$1 last;
# }
# if (!-e $request_filename)
# {
#    rewrite ^/$ index.php/;
#    rewrite ^(/.*)$ /index.php/$1 last;
# }
# error_page 404 /index.php;
#location ~ \.php$
# {
#    fastcgi_pass 127.0.0.1:90000;
#   fastcgi_index index.php;
#   fastcgi_param SCRIPT_FILENAME DOCROOT$fastcgi_script_name;
#   include fastcgi_params;
# }
# location ~ /\.ht
# {
#   deny all;
# }
}

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




More information about the nginx mailing list