new-support.webeffector.ru/docker/config/nginx/nginx.conf

67 lines
1.9 KiB
Nginx Configuration File

worker_processes 4;
http {
tcp_nopush on;
tcp_nodelay on;
keepalive_timeout 65;
types_hash_max_size 2048;
client_max_body_size 20m;
include /etc/nginx/mime.types;
default_type application/octet-stream;
access_log /var/www/docker/logs/nginx/access.log;
error_log /var/www/docker/logs/nginx/error.log;
gzip on;
gzip_disable "msie6";
server {
listen 80;
server_name content.local;
root /var/www/frontend/web;
index index.php index.html index.htm;
try_files $uri /$uri /index.php?$query_string;
location / {
try_files $uri $uri/ /index.php?$query_string;
root /var/www/frontend/web;
}
location ~ ^/.+\.php(/|$) {
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_read_timeout 3000;
}
}
server {
listen 80;
server_name admin.content.local;
root /var/www/backend/web;
index index.php index.html index.htm;
try_files $uri /$uri /index.php?$query_string;
location / {
try_files $uri $uri/ /index.php?$query_string;
root /var/www/backend/web;
}
location ~ ^/.+\.php(/|$) {
fastcgi_pass php:9000;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param HTTPS off;
fastcgi_read_timeout 3000;
}
}
}
events {
worker_connections 768;
}