Files
website/conf/nginx_dev.conf
T
2017-04-20 14:18:30 +02:00

65 lines
1.4 KiB
Plaintext
Executable File

upstream website_php {
server tt.website:9000;
}
upstream store_php {
server tt.store:9000;
}
server {
server_name talentstube.dev;
root /home/www/talentstube.dev/www/web;
client_max_body_size 500M;
sendfile off;
# DEV
location / {
try_files $uri /app_dev.php$is_args$args;
}
location ~ ^/(app_dev|config)\.php(/|$) {
fastcgi_pass website_php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
}
# PROD
location ~ ^/app\.php(/|$) {
fastcgi_pass website_php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
fastcgi_param DOCUMENT_ROOT $realpath_root;
internal;
}
# ---- PRESTASHOP ----
location ^~ /store/ {
root /home/www/talentstube.dev;
index index.php;
try_files $uri $uri/ /store/index.php;
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass store_php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
}
}
location ~ \.php$ {
return 404;
}
access_log /dev/stdout vhosts;
error_log /dev/stderr;
}