New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
Nginx, centmin, wordpress permalink.html = 404 Not Found?
Hi,
Just my another noobs question, i have a client, he's installing centmin on his VPS, everything look good except the permalink/rewrite rules. he got 404 error when he put /%category%/%postname%.html in permalink. i did try the same config on my test vps with script from server reviews, froxlor, or even ispconfig with no problem. anyone had same issue?
thanks.
Comments
Hello,
If you client gets 404 error pages of nginx (not 404 pages of wordpress) then it seems that nginx does not pass permalinks to php-fpm. You should review the nginx config file to ensure nginx will pass permalinks to php-fpm. You will need somethings like:
if your client setups wordpress insie a sub-directory of document root, modify /index.php to /sub-directory/index.php
An example here: http://wiki.nginx.org/Wordpress
P/S: after editing config file, don't forget to restart/reload nginx
Add the following code in Nginx config. Don't forget to invoke cofig :P
@tdc_adm @iKocka thanks but still not solved.
i can access it when i try to put /%category%/%postname% in permalink options. let say :
blabla.com/category1/post1
but not for /%category%/%postname%.html -> blabla.com/category1/post1.html
and this only appear in centmin from BTCentral.
It's strange. My wordpress site uses same .html extension like your client. Could you quote the nginx config file (server part).
sure..
blabla.com.conf
wp_params
there's the problem, check line 22
ah ok, i got it now. it's from staticfiles.conf
Oh, you catched the problem I also did remove .html from my staticfiles.conf but I forgot it this time.
By the way, you should remove this line:
Because
handles the same logic in a better way.
References:
http://wiki.nginx.org/IfIsEvil
http://wiki.nginx.org/Pitfalls
@tdc_adm yeah.. i put the wp_params -> remove the try_files and vice versa -> put them all together, etc. i'm little bit frustrated you know. :P