server {
include bx/node_port.conf;
server_name_in_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host:80;
set $imcontenttype "text/html; charset=utf-8";
set $docroot "/home/bitrix/www/site/htdocs";
# www redirect
}
index index.php;
root /home/bitrix/www/site/htdocs;
# Redirect to ssl if need
if (-f /home/bitrix/www/site/htdocs/.htsecure) {
rewrite ^(.*)$ https://$host$1 permanent;
}
location ~* ^.+\.(jpg|jpeg|gif|css|png|js|ico|html|flv|swf)$ {
keepalive_timeout 75;
keepalive_requests 100;
root /home/bitrix/www/site/htdocs/;
access_log off;
expires 30d;
autoindex on;
}
include bx/conf/im_common.conf;
include bx/conf/bitrix.conf;
include bx/server_monitor.conf;
}