232 lines
4.8 KiB
Plaintext
232 lines
4.8 KiB
Plaintext
#
|
|
# HTTP
|
|
#
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name b24.local;
|
|
|
|
real_ip_header X-Real-IP;
|
|
###set_real_ip_from %REAL_IP_FROM%;
|
|
|
|
#charset utf-8;
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
index index.php;
|
|
root /opt/www;
|
|
|
|
error_page 404 @bitrix;
|
|
error_page 405 =200 @php;
|
|
|
|
# redirect server error pages to the static page /500.html
|
|
error_page 500 502 503 504 /500.html;
|
|
location = /500.html {
|
|
root /opt/www;
|
|
}
|
|
|
|
# block
|
|
include /etc/nginx/inc/block.conf;
|
|
|
|
# static files
|
|
include /etc/nginx/inc/static.conf;
|
|
|
|
# bx temp
|
|
include /etc/nginx/inc/bx_temp.conf;
|
|
|
|
# composite
|
|
#include /etc/nginx/inc/composite.conf;
|
|
|
|
# push and pull
|
|
include /etc/nginx/inc/push.conf;
|
|
|
|
# clouds storage
|
|
include /etc/nginx/inc/clouds.conf;
|
|
|
|
# proxying
|
|
include /etc/nginx/inc/proxy.conf;
|
|
|
|
# php files processing
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
|
|
# for CalDAV/CardDAV/GroupDAV server
|
|
include /etc/nginx/inc/dav.conf;
|
|
|
|
# directories page processing
|
|
location / {
|
|
index index.php;
|
|
try_files $uri $uri/ @bitrix;
|
|
}
|
|
|
|
# php processing
|
|
location @php {
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
|
|
# bitrix rewrite
|
|
location @bitrix {
|
|
include fastcgi_params;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root/bitrix/urlrewrite.php;
|
|
#fastcgi_param SCRIPT_FILENAME $document_root/bitrix/routing_index.php;
|
|
}
|
|
}
|
|
#
|
|
# HTTPS
|
|
#
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name _;
|
|
|
|
include /etc/nginx/ssl/ssl.conf;
|
|
|
|
real_ip_header X-Real-IP;
|
|
###set_real_ip_from %REAL_IP_FROM%;
|
|
|
|
#charset utf-8;
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
index index.php;
|
|
root /opt/www;
|
|
|
|
error_page 404 @bitrix;
|
|
error_page 405 =200 @php;
|
|
|
|
# redirect server error pages to the static page /500.html
|
|
error_page 500 502 503 504 /500.html;
|
|
location = /500.html {
|
|
root /opt/www;
|
|
}
|
|
|
|
# block
|
|
include /etc/nginx/inc/block.conf;
|
|
|
|
# static files
|
|
include /etc/nginx/inc/static.conf;
|
|
|
|
# bx temp
|
|
include /etc/nginx/inc/bx_temp.conf;
|
|
|
|
# composite
|
|
#include /etc/nginx/inc/composite.conf;
|
|
|
|
# push and pull secure
|
|
include /etc/nginx/inc/push_secure.conf;
|
|
|
|
# clouds storage
|
|
include /etc/nginx/inc/clouds.conf;
|
|
|
|
# proxying
|
|
include /etc/nginx/inc/proxy.conf;
|
|
|
|
# php files processing
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
|
|
# for CalDAV/CardDAV/GroupDAV server
|
|
include /etc/nginx/inc/dav.conf;
|
|
|
|
# directories page processing
|
|
location / {
|
|
index index.php;
|
|
try_files $uri $uri/ @bitrix;
|
|
}
|
|
|
|
# php processing
|
|
location @php {
|
|
include fastcgi_params;
|
|
fastcgi_split_path_info ^(.+\.php)(.*)$;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
}
|
|
|
|
# bitrix rewrite
|
|
location @bitrix {
|
|
include fastcgi_params;
|
|
fastcgi_pass php:9000;
|
|
fastcgi_index index.php;
|
|
fastcgi_param SCRIPT_FILENAME $document_root/bitrix/urlrewrite.php;
|
|
#fastcgi_param SCRIPT_FILENAME $document_root/bitrix/routing_index.php;
|
|
}
|
|
}
|
|
#
|
|
# HTTP MOBILE
|
|
#
|
|
server {
|
|
listen 8893;
|
|
listen [::]:8893;
|
|
server_name _;
|
|
|
|
real_ip_header X-Real-IP;
|
|
###set_real_ip_from %REAL_IP_FROM%;
|
|
|
|
#charset utf-8;
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# errors pages
|
|
include /etc/nginx/inc/errors.conf;
|
|
|
|
# block
|
|
include /etc/nginx/inc/block.conf;
|
|
|
|
# push and pull
|
|
include /etc/nginx/inc/push.conf;
|
|
|
|
location / {
|
|
index index.html;
|
|
root /etc/nginx/blank;
|
|
}
|
|
}
|
|
#
|
|
# HTTPS MOBILE
|
|
#
|
|
server {
|
|
listen 8894 ssl;
|
|
listen [::]:8894 ssl;
|
|
server_name _;
|
|
|
|
include /etc/nginx/ssl/ssl.conf;
|
|
|
|
real_ip_header X-Real-IP;
|
|
###set_real_ip_from %REAL_IP_FROM%;
|
|
|
|
#charset utf-8;
|
|
access_log /var/log/nginx/access.log;
|
|
error_log /var/log/nginx/error.log;
|
|
|
|
# errors pages
|
|
include /etc/nginx/inc/errors.conf;
|
|
|
|
# block
|
|
include /etc/nginx/inc/block.conf;
|
|
|
|
# push and pull secure
|
|
include /etc/nginx/inc/push_secure.conf;
|
|
|
|
location / {
|
|
index index.html;
|
|
root /etc/nginx/blank;
|
|
}
|
|
}
|
|
#
|