Convert lighttpd rewrite rule to nginx

justin nginx-forum at
Thu Jul 26 00:47:57 UTC 2012


Thanks for the reply. Still not working, getting 404 error.

Here is the config snippet I am using:

server {
  listen 80;


  root /srv/www/domains/;
  index index.php;

  access_log /var/log/nginx/domains/;
  error_log /var/log/nginx/domains/;

  include /etc/nginx/excludes.conf;

  location ~ ^[^.]+$ {
    try_files $uri =404;
    fastcgi_param SCRIPT_FILENAME $document_root/controller.php;
    fastcgi_param PATH_INFO $uri;
    fastcgi_intercept_errors on;
    include /etc/nginx/fastcgi_params;

  #Needed for standard php files which end with the .php extension
  include /etc/nginx/php.conf;

  include /etc/nginx/expires.conf;

Posted at Nginx Forum:,228909,228976#msg-228976

More information about the nginx mailing list