diff --git a/etc/nginx/sites-enabled/server b/etc/nginx/sites-enabled/server new file mode 100644 index 0000000..b5c35d6 --- /dev/null +++ b/etc/nginx/sites-enabled/server @@ -0,0 +1,21 @@ +#配置参考 +server { + listen 8088; + server_name php-web-8088; + + root /var/www/html; + index index.php index.html; + + location ~ \.php$ { +# include snippets/fastcgi-php.conf; + root /var/www/html; + fastcgi_pass unix:/run/php/php8.2-fpm.sock; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + + location / { + try_files $uri $uri/ =404; + } +} \ No newline at end of file