# Default SSL certificate enabled website
server {
listen 80;
server_name bitrix.olddomain.ru;
rewrite ^
https://bitrix.newdomain.com$request_uri;
}
server {
listen 443 ssl http2;
server_name bitrix.newdomain.com;
# Enable SSL connection
include bx/conf/ssl.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:443;
proxy_set_header HTTPS YES;
set $proxyserver "
127.0.0.1:8888";
set $docroot "/home/bitrix/www";
index index.php;
root /home/bitrix/www;
# custom options for sites; doesn't changes on update
include bx/site_settings/default/*.conf;
# Include parameters common to all websites
include bx/conf/bitrix.conf;
# Include server monitoring API's
include bx/server_monitor.conf;