4chan/conf/nginx_site_global.conf
2025-04-17 18:12:08 -05:00

44 lines
916 B
Text

# ayase's config entries for all nginx subdomains
index index.html;
charset utf-8;
location /server-status {
stub_status on;
deny all;
}
# only allow these request methods
if ($request_method !~ ^(GET|HEAD|OPTIONS|POST)$ ) {
return 444;
}
# redirect .php/.cgi requests
# this is overriden by domain config
location ~* \.(php|cgi)$ {
rewrite ^(.*)$ http://www.4chan.org$1 permanent;
}
# root just redirects to www
location = / {
rewrite ^.* http://www.4chan.org/ redirect;
}
# error pages aren't located in htdocs
location ~ /(403|404).html {
alias /www/global/web_shared/error/$1.html;
}
error_page 403 /403.html;
error_page 404 /404.html;
# deny access to .* files
location ~ /\. {
deny all;
}
location ~ ^/(favicon\.ico(\.gz)?|crossdomain\.xml(\.gz)?)$ {
alias /www/global/web_shared/$1; break;
}
include nginx_cloudflare.conf;