Include a functional market nginx config.

Addresses #1021

Thanks @mmolitor87
This commit is contained in:
Adarnof 2018-04-17 21:37:15 -04:00
parent b8a2d65a1d
commit 2cd8188ffb

View File

@ -122,12 +122,29 @@ A minimal Nginx config might look like:
index app.php; index app.php;
access_log /var/logs/market.access.log; access_log /var/logs/market.access.log;
location ~ \.php$ { # strip app.php/ prefix if it is present
try_files $uri =404; rewrite ^/app\.php/?(.*)$ /$1 permanent;
fastcgi_pass unix:/tmp/php.socket;
fastcgi_index app.php; location / {
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; index app.php;
try_files $uri @rewriteapp;
}
location @rewriteapp {
rewrite ^(.*)$ /app.php/$1 last;
}
# pass the PHP scripts to FastCGI server from upstream phpfcgi
location ~ ^/(app|app_dev|config)\.php(/|$) {
fastcgi_pass 127.0.0.1:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params; include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
}
location ~ /\.ht {
deny all;
} }
} }