mirror of
https://github.com/kevinveenbirkenbach/computer-playbook.git
synced 2025-09-08 11:17:17 +02:00
48 lines
1.1 KiB
Django/Jinja
48 lines
1.1 KiB
Django/Jinja
worker_processes auto;
|
|
|
|
events { worker_connections 1024; }
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
|
|
access_log /dev/stdout;
|
|
error_log /dev/stderr;
|
|
|
|
upstream fastcgi_backend {
|
|
server {{ MAGENTO_PHP_HOST }}:{{ MAGENTO_PHP_PORT }};
|
|
}
|
|
|
|
server {
|
|
listen {{ MAGENTO_NGINX_PORT }};
|
|
server_name {{ MAGENTO_DOMAIN }};
|
|
|
|
set $MAGE_ROOT /var/www/html;
|
|
root $MAGE_ROOT/pub;
|
|
index index.php;
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$args;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
fastcgi_index index.php;
|
|
fastcgi_pass fastcgi_backend;
|
|
fastcgi_read_timeout 300;
|
|
fastcgi_connect_timeout 5s;
|
|
}
|
|
|
|
location ~* ^/(app|var|lib|dev|update|vendor|node_modules|\.git|\.svn)/ { deny all; }
|
|
location ~ /\. { deny all; }
|
|
|
|
error_page 404 403 = /errors/404.php;
|
|
}
|
|
}
|