From 53b3eec05717c080a2d13e7f5ee35e637ce21309 Mon Sep 17 00:00:00 2001 From: LyLme Date: Tue, 26 Dec 2023 02:11:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=84=9A=E6=9C=AC=E9=83=A8=E7=BD=B2Nginx?= =?UTF-8?q?=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- nginx/conf.d/nginx.conf.bak | 44 +++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 nginx/conf.d/nginx.conf.bak diff --git a/nginx/conf.d/nginx.conf.bak b/nginx/conf.d/nginx.conf.bak new file mode 100644 index 0000000..d6b8667 --- /dev/null +++ b/nginx/conf.d/nginx.conf.bak @@ -0,0 +1,44 @@ + server { + listen default_server; + server_name ; + absolute_redirect off; + root /var/www/html; + location / { + index index.html index.htm index.php; + } + location ~ \.php$ { + fastcgi_pass spage-php74:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + location ~ ^/(\.user.ini|\.htaccess|\.git) { + return 404; + } + location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { + expires 12h; + error_log off; + access_log off; + } + location ~ .*\.(js|css)?$ { + expires 12h; + error_log off; + access_log off; + } + } + + server { + #内网访问 + listen 80; + server_name _; + root /var/www/html; + location / { + index index.html index.htm index.php; + } + location ~ \.php$ { + fastcgi_pass spage-php74:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + }