Hi.
I'm not sure if I screwed up a configuration file somewhere, but if someone tries to access a garbage url such as /fsdkfsdkfkwdfjf without an extension, they get forced to a download for the source code (!!!!) of my error page.
Any ideas on where to start?
server {
listen 80;
server_name alpha7f.com www.alpha7f.com ssl.alpha7f.com;
#ROOT REMOVED
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php /index.html @catchall;
}
location ~ ^/(blog/|join/|forum/|membership/|about/|legal/) {
try_files $uri $uri/ /switch.php?req=$uri&$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_intercept_errors on;
}
location @catchall {
if ($request_filename ~* (%\/|\.html|\.jpg|\.png|\.css|\.txt|\.js)$ ) {
break;
}
return 444;
}
}
# HTTPS server
#
server {
listen 443;
server_name ssl.alpha7f.com;
#ROOT REMOVED
index index.php index.html index.htm;
ssl on;
# NOTE: SSL Stuff removed
ssl_session_timeout 5m;
ssl_protocols SSLv3 TLSv1;
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv3:+EXP;
ssl_prefer_server_ciphers on;
location / {
try_files $uri $uri/ /index.php /index.html;
}
error_page 404 /error.php?e=404&uri=$uri&$args;
error_page 403 /error.php?e=404&uri=$uri&$args;
location ~ ^/(blog/|join/|forum/|membership/|about/|legal/|login/|account/) {
try_files $uri $uri/ /switch.php?req=$uri&$args;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_intercept_errors on;
include fastcgi_params;
}
}
server {
listen 80 default_server;
return 444;
}