Changes specific to empirereportnewyork.com

This commit is contained in:
root 2025-02-24 00:09:57 +00:00
parent fc9cccb05e
commit 939e049fc1
9 changed files with 32 additions and 5 deletions

View File

@ -5,4 +5,18 @@ sendfile on;
tcp_nopush on;
# Don't wait to send data in keep-alive state.
tcp_nodelay on;
tcp_nodelay on;
map $http_user_agent $user_type {
default "desktop";
# Android
"~Mozilla/5.0 \(Linux; Android" mobile;
# Opera
"~Opera Mini" mobile;
# iOS
"~Mozilla/5.0 \(iPhone" mobile;
# Windows Phone
"~Mozilla/5.0 \(Windows Phone" mobile;
}

View File

@ -9,5 +9,5 @@
include /etc/nginx/upstreams/*.conf;
map '' $upstream {
default php73;
default php81;
}

View File

@ -8,4 +8,6 @@ include global/server/exclusions.conf;
include global/server/security.conf;
# Static Content
include global/server/static-files.conf;
include global/server/static-files.conf;
rewrite /sitemap_index.xml$ /index.php?sitemap=1 last;
rewrite /([^/]+?)-sitemap([0-9]+)?.xml$ /index.php?sitemap=$1&sitemap_n=$2 last;

View File

@ -1,5 +1,5 @@
# The key to use when saving cache files, which will run through the MD5 hashing algorithm.
fastcgi_cache_key "$scheme$request_method$host$request_uri";
fastcgi_cache_key "$scheme$request_method$host$user_type$request_uri";
# If an error occurs when communicating with FastCGI server, return cached content.
# Useful for serving cached content if the PHP process dies or timeouts.

View File

@ -37,4 +37,4 @@ location ~* \.(?:ttf|ttc|otf|eot|woff|woff2)$ {
location = /robots.txt {
access_log off;
log_not_found off;
}
}

1
modules-available Symbolic link
View File

@ -0,0 +1 @@
/usr/share/nginx/modules

View File

@ -12,6 +12,8 @@ worker_rlimit_nofile 8192;
# File that stores the process ID. Rarely needs changing.
pid /run/nginx.pid;
load_module modules/ngx_http_cache_purge_module.so;
events {
# Set the maximum number of connection each worker process can open. Anything higher than this
# will require Unix optimisations.

4
upstreams/php74.conf Normal file
View File

@ -0,0 +1,4 @@
# Defines the upstream for PHP 7.0
upstream php74 {
server unix:/run/php/php7.4-fpm.sock;
}

4
upstreams/php81.conf Normal file
View File

@ -0,0 +1,4 @@
# Defines the upstream for PHP 7.0
upstream php81 {
server unix:/run/php/php8.1-fpm.sock;
}