server {
root /root/nginx_html;
    server_name site.sailforce.online site.sailforce.xyz;
	location /ray { # 与 V2Ray 配置中的 path 保持一致
    	#proxy_set_header Upgrade $http_upgrade;
    	#proxy_set_header Connection "upgrade";
    	proxy_set_header Host $host;
        proxy_set_header  X-Forwarded-Proto https;
    	proxy_set_header X-Real-IP $remote_addr;
    	proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
	}
	location /prod-api {
	proxy_pass   http://xingyueapp.com:8088;
  	proxy_set_header  Host $http_host:$server_port;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-Port $server_port;
	}

	location /Oj8QSvJozT6rqw9 {
	proxy_pass   https://127.0.0.1:33440;
  	proxy_set_header  Host $http_host:$server_port;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-Port $server_port;
	}

	location /app {
	proxy_pass   http://100.0.0.1:8500;
  	proxy_set_header  Host $http_host:$server_port;
        proxy_set_header  X-Real-IP $remote_addr;
        proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header  X-Forwarded-Proto https;
        proxy_set_header  X-Forwarded-Port $server_port;
	}

    location ~ \.php(.*)$ {
            fastcgi_pass   127.0.0.1:9000;
            fastcgi_index  index.php;
            fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
            fastcgi_param  PATH_INFO  $fastcgi_path_info;
            fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
            include        fastcgi_params;
    }
    location /dart {
          index  index.html index.htm index.php;
    }

    location /alf {
          index  index.html index.htm index.php;
    }

    location /api {
          index  index.html index.htm index.php;
    }

    location / {
	root /root/nginx_html;
        autoindex on;
          index  index.html index.htm index.php;
    }

    access_log /var/www/html/log/site.log ;
	





    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/site.sailforce.xyz/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/site.sailforce.xyz/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}
server {
    if ($host = site.sailforce.xyz) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


    server_name site.sailforce.online site.sailforce.xyz;
    listen 80;
    return 404; # managed by Certbot


}