You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

53 lines
1.3 KiB

worker_processes 2;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log logs/access.log main;
sendfile on;
keepalive_timeout 65;
gzip on;
set_real_ip_from 172.16.30.0/24;
upstream fpm {
server unix:/run/php-fpm/php-fpm.sock;
}
map $http_host $app_env {
hostnames;
stage.m.* mobile;
m.* mobile;
}
server {
server_name domain;
listen 80;
listen 443 ssl http2;
ssl_certificate /etc/ssl/domain.crt;
ssl_certificate_key /etc/ssl/domain.key;
root /var/www/octobercms;
include www.conf;
include https.conf;
include octobercms.conf;
include staticfiles.conf;
location ~ ^/(index|t).php {
fastcgi_pass fpm;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_read_timeout 3000;
fastcgi_param APP_ENV $app_env;
}
}
}