Добавить 'openresty.conf'
This commit is contained in:
61
openresty.conf
Normal file
61
openresty.conf
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
#user nobody;
|
||||||
|
worker_processes 2;
|
||||||
|
|
||||||
|
error_log logs/error.log;
|
||||||
|
#error_log logs/error.log notice;
|
||||||
|
#error_log logs/error.log info;
|
||||||
|
|
||||||
|
#pid logs/nginx.pid;
|
||||||
|
|
||||||
|
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 ~ ^/backend {
|
||||||
|
client_max_body_size 10M;
|
||||||
|
}
|
||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user