mirror of
https://gitlab.com/omair-personal/vagrant.git
synced 2026-08-19 12:24:18 +00:00
39 lines
1.1 KiB
Plaintext
39 lines
1.1 KiB
Plaintext
server {
|
|
listen 80;
|
|
listen 443 default_server ssl;
|
|
|
|
root /var/www/html/VAGRANT_SERVER_NAME/public;
|
|
index index.php index.html index.htm;
|
|
|
|
ssl_certificate /etc/nginx/ssl/self-ssl.crt;
|
|
ssl_certificate_key /etc/nginx/ssl/self-ssl.key;
|
|
|
|
server_name VAGRANT_SERVER_NAME;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
# PHP-FPM Configuration Nginx
|
|
location ~ [^/]\.php(/|$) {
|
|
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
|
if (!-f $document_root$fastcgi_script_name) {
|
|
return 404;
|
|
}
|
|
|
|
# Mitigate https://httpoxy.org/ vulnerabilities
|
|
fastcgi_param HTTP_PROXY "";
|
|
|
|
fastcgi_pass 127.0.0.1:9000;
|
|
fastcgi_index index.php;
|
|
|
|
# include the fastcgi_param setting
|
|
include fastcgi_params;
|
|
|
|
# SCRIPT_FILENAME parameter is used for PHP FPM determining
|
|
# the script name. If it is not set in fastcgi_params file,
|
|
# i.e. /etc/nginx/fastcgi_params or in the parent contexts,
|
|
# please comment off following line:
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
} |