I want to convert existing PHP Smarty templates deployment from Apache to nginx configuration. Apache:\[code\]RewriteEngine OnRewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php [L,QSA]<IfModule mod_rewrite.c> RewriteRule ^(.*/)?\.svn/ - [F] RewriteRule ^(.*/)?templates/ - [F] RewriteRule ^(.*/)?templates_c/ - [F] RewriteRule ^(.*/)?inc/ - [F] RewriteRule ^(.*/)?libs/ - [F] RewriteRule ^(.*/)?mods/ - [F]</IfModule>\[/code\]My nginx attempt:\[code\]server { listen 80; server_name 192.167.1.124; root /var/www/; index index.php; ## Images and static content is treated different location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|xml)$ { access_log off; expires 30d; } location ~ ^.*(\.svn|templates/|templates_c/|inc/|libs/|mods/|.ht) { return 403; } location / { # I think it is possible to use try ... if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; } } ## Pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 location ~ index\.php$ { fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME /var/www/$fastcgi_script_name; include /etc/nginx/fastcgi_params; }}\[/code\]The home page shown correctly, but all pseudo *.html pages forces index.php script download with *.html name. Thanks for help.