[root@ufo cache]# cat /var/www/vhosts/system/domain/conf/nginx.conf
#ATTENTION!
#
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
server {
    listen IP.IP.IP.IP:443 ssl http2;
    server_name domain;
    server_name www.domain;
    server_name ipv4.domain;
    ssl_certificate             /usr/local/psa/var/certificates/cert-ubByPa;
    ssl_certificate_key         /usr/local/psa/var/certificates/cert-ubByPa;
    ssl_client_certificate      /usr/local/psa/var/certificates/cert-7zLlB8;
    client_max_body_size 128m;
    proxy_read_timeout 600;
    root "/var/www/vhosts/domain/httpdocs";
    access_log "/var/www/vhosts/system/domain/logs/proxy_access_ssl_log";
    error_log "/var/www/vhosts/system/domain/logs/proxy_error_log";
    #extension letsencrypt begin
    location ^~ /.well-known/acme-challenge/ {
        root /var/www/vhosts/default/htdocs;
        types { }
        default_type text/plain;
        satisfy any;
        auth_basic off;
        allow all;
        location ~ ^/\.well-known/acme-challenge.*/\. {
            deny all;
        }
    }
    #extension letsencrypt end
    #extension sslit begin
    add_header Strict-Transport-Security "max-age=63072000; includeSubDomains" always;
    #OCSP Stapling
    ssl_stapling on;
    ssl_stapling_verify on;
    #extension sslit end
    location / {
        proxy_pass https://IP.IP.IP.IP:7081;
        proxy_set_header Host             $host;
        proxy_set_header X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header X-Accel-Internal /internal-nginx-static-location;
        access_log off;
    }
    location /internal-nginx-static-location/ {
        alias /var/www/vhosts/domain/httpdocs/;
        internal;
    }
    location ~ ^/~(.+?)(/.*?\.php)(/.*)?$ {
        alias /var/www/vhosts/domain/web_users/$1/$2;
        fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass "unix:///var/www/vhosts/system/domain/php-fpm.sock";
        include /etc/nginx/fastcgi.conf;
    }
    location ~ ^/~(.+?)(/.*)?$ {
        proxy_pass https://IP.IP.IP.IP:7081;
        proxy_set_header Host             $host;
        proxy_set_header X-Real-IP        $remote_addr;
        proxy_set_header X-Forwarded-For  $proxy_add_x_forwarded_for;
        proxy_set_header X-Accel-Internal /internal-nginx-static-location;
        access_log off;
    }
    location ~ \.php(/.*)?$ {
        fastcgi_split_path_info ^((?U).+\.php)(/?.+)$;
        fastcgi_param PATH_INFO $fastcgi_path_info;
        fastcgi_pass "unix:///var/www/vhosts/system/domain/php-fpm.sock";
        include /etc/nginx/fastcgi.conf;
    }
    include "/var/www/vhosts/system/domain/conf/vhost_nginx.conf";
}
server {
    listen IP.IP.IP.IP:80;
    server_name domain;
    server_name www.domain;
    server_name ipv4.domain;
    client_max_body_size 128m;
    proxy_read_timeout 600;
    location / {
        return 301 https://$host$request_uri;
    }