I migrated my site from Apache to Nginx,the problem now is my permalinks have an extra index.php in the URL, I am not able to determine if this is a wordpress issue or my configuration issue.
Example when my post is rendered the original link: http://hs.com/2012/04/30/a-new-question/ is now being linked as http://hs.com/*index.php/*2012/04/30/a-new-question/
I tried the nginx compatibility plug in.. also tried the custom structure options with and without the plug in and I am just not able to understand what is going on. Wordpress says that the custom permalink structure is saved, even then all links in the site are rendered incorrectly.
Here is my nginx configuration for the site.
server {
server_name harshasagar.com www.harshasagar.com;
access_log /srv/www/harshasagar.com/logs/access.log;
error_log /srv/www/harshasagar.com/logs/error.log;
root /srv/www/harshasagar.com/public_html;
if ($host ~* www\.(.*)) {
set $host_without_www $1;
rewrite ^(.*)$ http://$host_without_www$1 permanent; # $1 contains '/foo', not 'www.mydomain.com/foo'
}
location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php?q=$uri&$args;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /srv/www/harshasagar.com/public_html$fastcgi_script_name;
}