Hello, something is odd to me and I don't know enough, other than asking a good question
1) default install of nginx and all is good. installed WP at root of domain.
2) FPM via nginx is selected
3) the blog is installed and it has NO htaccess file
4) here is my findings and odd thing, plus question:
a) IF I HAVE THIS in the apache & nginx 'additional directives' == the blog works fine and the permalinks work too
if (!-f $request_filename){
set $rule_1 1$rule_1;
}
if (!-d $request_filename){
set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
rewrite ^/wp-admin/(.*)\.php$ /wp-admin/$1.php last;
rewrite /. /index.php last;
}
B) however, "if statements" are not optimal for nginx, not supposed to use them...so this is supposed to work and be better, right?
location / {
try_files $uri $uri/ /index.php?$args;
}
but when you do that, you get this error -- "location /" has already been defined
== that is because the initial config/setup that default plesk did, used the / location ==
FYI> that is over my head... I just know that is the issue, meaning, plesk set it up
and already defined lcoation / --- ie. that is why the error says its duplicated.
SO, I try this:
location ~/ {
try_files $uri $uri/ /index.php?$args;
}
BUT back to the 404 not found for permalinks
what is the solution?
thanks for your help!!!
ps. reference: http://nginxlibrary.com/wordpress-permalinks/
1) default install of nginx and all is good. installed WP at root of domain.
2) FPM via nginx is selected
3) the blog is installed and it has NO htaccess file
4) here is my findings and odd thing, plus question:
a) IF I HAVE THIS in the apache & nginx 'additional directives' == the blog works fine and the permalinks work too
if (!-f $request_filename){
set $rule_1 1$rule_1;
}
if (!-d $request_filename){
set $rule_1 2$rule_1;
}
if ($rule_1 = "21"){
rewrite ^/wp-admin/(.*)\.php$ /wp-admin/$1.php last;
rewrite /. /index.php last;
}
B) however, "if statements" are not optimal for nginx, not supposed to use them...so this is supposed to work and be better, right?
location / {
try_files $uri $uri/ /index.php?$args;
}
but when you do that, you get this error -- "location /" has already been defined
== that is because the initial config/setup that default plesk did, used the / location ==
FYI> that is over my head... I just know that is the issue, meaning, plesk set it up
and already defined lcoation / --- ie. that is why the error says its duplicated.
SO, I try this:
location ~/ {
try_files $uri $uri/ /index.php?$args;
}
BUT back to the 404 not found for permalinks
what is the solution?
thanks for your help!!!
ps. reference: http://nginxlibrary.com/wordpress-permalinks/