site-available下defult文件修改后以往穿透德端口连接都重置
文件复原无效,如下:
server {
listen 80 default_server;
listen [::]:80 default_server;
listen 443 ssl default_server;
listen [::]:443 ssl default_server;
root /var/www/html;
index index.html index.php index.htm index3.html;
server_name _;
location / {
try_files $uri $uri/ =404;
}
location ~ .*\.php(\/.*)*|.html$ {
include snippets/fastcgi-php.conf;
set $path_info "";
set $real_script_name $fastcgi_script_name;
if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
set $real_script_name $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
}
include /etc/nginx/locations.d/*;
}