• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Odd 404 error with a simple addon of mine


Active member
Hopefully someone can give some light as to why this might be happening, and out of the blue too when before the addon functioned perfectly.

Basically it's a simple addon that adds a NavTab for a custom page / template I make. That page has a sidebar with links to other pages/templates the addon serves. What's odd though, is for one of the templates/pages, the link is 'site.com/servers/css' and this will result in a 404 error, however, I have other pages, such as 'site.com/servers/tf2' and these function perfectly fine.

If I add an end slash to the css one, site.com/servers/css/ it works, but why are all the other pages working with no end slash? I looked up my error logs and found this:

2012/03/08 18:58:03 [error] 2378#0: *1168438 open() "/var/www/site.com/htdocs/servers/css" failed (2: No such file or directory), client: X.X.X.X, server: site.com, request: "GET /servers/css HTTP/1.1", host: "site.com", referrer: "http://site.com/servers/"
I can't figure out why that link would actually be trying to open a folder/file relative to the site's doc root... especially when its controller matches all the others

Anyone have any ideas why this is happening all of the sudden?


Active member
What is in your .htaccess file?
On nginx, but the htaccess.TXT in the XF root is the default contents. I could supply my nginx server definition? Or any related config. I haven't touched the configs though, very odd that this was working before and now it isn't... but eh, I guess that's how most issues are... just pop up seemingly out of the blue. :confused:

These are the only rules in the actual server definition, rest is just the regular crap, defining the root, the access/error log, the listen ip/port..

# private dirs:
location ~ ^/(internal_data|library)/(.*)$ {

# clean urls:
location / {
try_files $uri $uri/ /index.php?$uri&$args;
index index.php index.html;

# Deny all attempts to access any dotfile (=hidden files) such as .htaccess, .htpasswd, .DS_Store, .directory, .svn, .git
location ~ /\. {
deny all;
access_log off;
log_not_found off;

There is this in my php location definition:
location ~ \.php$ {
# Zero-day exploit defense.
# http://forum.nginx.org/read.php?2,88845,page=3
# Won't work properly (404 error) if the file is not stored on this server, which is entirely possible with php-fpm/php-fcgi.
try_files $uri =404;
That's the closest thing I can find that would warrant a weird 404, I commented it out though and restarted the services, behavior continued.


Active member
Yeah I'm pretty stumped... to my knowledge the configs haven't been touched, packages haven't been upgraded... was working for weeks and all of the sudden it doesn't. Guess I've got some deeper digging to do... :(

Thanks for taking a look.