server {
listen 80;
server_name ******.com;
location / {
proxy_pass https://h5admin.***.com;
proxy_set_header Host h5admin.***.com;
add_header Access-Control-Allow-Methods *;
sub_filter ‘https://adminapi.***.com’ ‘http://***.com/Api’;
sub_filter_once off;
sub_filter_types text/html text/css application/javascript application/json;
proxy_set_header Accept-Encoding "";
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
#proxy_set_header Connection keep-alive;
proxy_set_header Connection "upgrade";
proxy_cache_bypass $http_upgrade;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_buffering off;
proxy_read_timeout 100s;
#try_files $uri $uri/ /web/evaluationapp/index.html;
}
location ^~ /.well-known/acme-challenge/ {
default_type "text/plain";
allow all;
root /var/ssl;
}
}