[nginx] 測試機環境設置
server {
listen 80;
listen [::]:80;
listen 9000;
root /var/www/html/casino-keypad-admin/public;
# Add index.php to the list if you are using PHP
index index.php index.html index.htm index.nginx-debian.html;
server_name key-pad-manager.stage.com;
client_max_body_size 20M;
location ~ ^/(php_fpm_status|php_fpm_ping)$ {
# auth_basic "closed site";
# auth_basic_user_file /etc/nginx/.htpasswd;
access_log off;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_pass unix:/run/php/php7.2-fpm.sock;
}
location / {
# access_log off;
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
# access_log off;
try_files $uri /index.php =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php/php7.2-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}