炫意html5
最早CSS3和HTML5移动技术网站之一

使用nginx反向代理网站时 , 网站加载报错

反向代理成功后 , 网站可以进去 , 但是初始化加载时报错 , 执行ajax请求时报错 , nginx配置如下 :
server {
listen 8010;
server_name 192.168.2.105;

    #location / {
#    root   html;
#    index  index.html index.htm;
#}
location / {
proxy_pass http://192.168.2.105:820;
proxy_redirect default;
proxy_set_header Host  $http_host;
proxy_set_header Cookie $http_cookie;
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 $scheme;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
client_max_body_size  100m;
proxy_connect_timeout       1;
}
location /TianChen/ {
rewrite  ^.+TianChen/?(.*)$ /$1 break;
include  uwsgi_params;
proxy_pass http://192.168.2.143:808/;
proxy_set_header Host  $http_host;
proxy_set_header Cookie $http_cookie;
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 $scheme;
add_header 'Access-Control-Allow-Origin' '*';
add_header 'Access-Control-Allow-Credentials' 'true';
client_max_body_size  100m;
proxy_connect_timeout       1;
}
location ~.*\.(html|js|css|map|gif|png|jpg|woff|woff2|ico)$ {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
add_header Access-Control-Allow-Origin $http_origin;
add_header Access-Control-Allow-Headers X-Requested-With;
add_header Access-Control-Allow-Methods GET,POST,OPTIONS;
proxy_pass http://192.168.2.143:808;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
sub_filter <head> '<head> <meta name="referrer" content="no-referrer" />';
}

报错图 :

回答

rootpath是什么

炫意HTML5 » 使用nginx反向代理网站时 , 网站加载报错

Java基础教程Android基础教程