我有website,它是用nuxt js编写的。在其他国家/地区则无效。这是在不同国家/地区测试网站的屏幕截图结果。 image 它是我的nginx配置:
map $sent_http_content_type $expires {
"text/html" epoch;
"text/html; charset=utf-8" epoch;
default off;
}
server {
server_name www.allhospital.info; return 301
$scheme://allhospital.info$request_uri;
}
server {
listen 80;
server_name allhospital.info www.allhospital.info;
gzip on;
gzip_types text/plain application/xml text/css
application/javascript;
gzip_min_length 1000;
# Useful logs for debug.
access_log /var/log/nginx/allhospital_info.log;
error_log /var/log/nginx/allhospital_info_error.log;
location / {
expires $expires;
#auth_basic "Restricted Content";
#auth_basic_user_file /etc/nginx/.htpasswd;
proxy_redirect off;
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-Forwarded-Proto $scheme;
proxy_read_timeout 1m;
proxy_connect_timeout 1m;
proxy_pass http://localhost:9000;
}
}