I think this seems to be working for now. Does anyone see a problem with it: # define web root root /var/www/html/public; index index.php default.php index.html; location / { try_files $uri $uri/ =404; } location ~ [^/]\.php(/|$) { fastcgi_split_path_info ^(.+?\.php)(/.*)$; # Save the $fastcgi_path_info before try_files clear itby lmauldinpe15 - Nginx Mailing List - English
If I followed your post correctly, you wanted me to make a map of locations. However, I want the users to be able to add a new directory (ex: /var/www/c/foo) and have a url like 'http://xxx/c/foo/index.php/users/login' automatically served by /var/www/c/foo/index.php without having to change Nginx configuration. Is this possible?by lmauldinpe15 - Nginx Mailing List - English
Did you mean to use nested location blocks? I tried it but it didn't work. Here is the relevant part of my configuration file: # define web root root /var/www/html/public; index index.php index.html; location /index.php { location ~* (?:.*/index.php)(.*) { fastcgi_param SCRIPT_FILENAME $document_root$1; fastcgi_pass unix:/var/run/php5-by lmauldinpe15 - Nginx Mailing List - English
Another note, on some of the application sub directories, I need to emulate this rule from .htaccess: RewriteRule ^(.*)$ %{DOCUMENT_ROOT}/index.php/$1by lmauldinpe15 - Nginx Mailing List - English
I have a single Nginx installation and I am using PHP-FPM to serve multiple PHP applications in sub directories. Example: /var/www/ (this is 'root') /var/www/a/foo/index.php /var/www/a/bar/index.php /var/www/b/bar/index.php I want to setup url rewriting so that any request to http://xxx/a/foo/index.php/users/login gets redirected to http://xxx/a/foo/index.php and similarly http://xxx/a/by lmauldinpe15 - Nginx Mailing List - English