Hello Friends, Does anyone know how to get nginx to load Wordpress' default 404 page? Currently it keeps loading the standard ispconfig 404 pages. I have searched the forum and found a couple threads with the same subject matter but none of the answers seem to solve my issue. I have tried many " location /{ index index.php..." configurations but none of them seem to solve the problem either. Any kind of help will be greatly appreciated.
Have you set in ISPConfig the "Own Error-Documents:" for that website? That should enable you to copy the error pages you want to the custom location. In what way is your issue different from the others discussed in the forum?
Yes i have that option checked. The problem is i am trying to load wordpress's 404 page instead of my custom ispconfig 404 page. It's important because it allows me to create a dynamic 404 page.
Also did that. Unchecking that option makes the site load the global ispconfig error pages instead of site specific custom ispconfig error pages. So strange, with webmin it works the way it's supposed to.
Did you set your custom error page URL's with the ErrorDocument directive in the nginx directives field? When the ISPConfig custom error pages are disabled (which set ErrorDocument), then the default ones from nginx will kick in unless you define your own ones like: ErrorDocument 404 /my/404/error/url.htm
Or a more general question, which directives did you set for WordPress in the nginx directives field at the moment. It might be that some other directives might work as well, not just the ErrorDocument handler.
I haven't defined any error pages or error page locations My Nginx directives setting : Code: location / { try_files $uri $uri/ /index.php?$args; } # nginx configuration location / { if (!-e $request_filename){ rewrite ^(.*)$ /index.php break; {DOCROOT} } }
Finally it works! So silly, i discovered a "mydomain.com".err file inside my nginx "sites-available" directory and came to the conclusion that my settings were no good. I removed all incorrect lines/text from the "options" tab in my site's "nginx directives" settings and unchecked "Own Error-Documents". Thanks guys, you led me in the right direction.