1
Tink 2015-02-22 19:49:39 +08:00 via iPad
conf随便叫什么,servername就写你的阿里云域名
|
3
njulzp 2015-02-22 20:56:25 +08:00
server_name 和 proxy_pass 一样, 囧
我今天第一次用nginx ,就这么写,改hosts,也能工作, server { listen 80; server_name www.alicesoft.com; location / { proxy_pass http://www.alicesoft.com; } } server { listen 80; server_name download.alicesoft.com; location / { proxy_pass http://download.alicesoft.com; } } |
4
cokebar 2015-02-22 21:40:55 +08:00
这个是我反代google fonts的,贴出来给你做个参考
location ^~ /google_fonts_mirror/ { proxy_pass http://fonts.gstatic.com/; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; } |
5
ryd994 2015-02-23 00:27:48 +08:00 via Android
servername可以填你的IP,因为浏览器在访问IP的时候host就是设置为IP的
有任何问题,麻烦先看errorlog |
9
viko16 2015-02-23 02:53:29 +08:00 via Android
点错了抱歉 @jianghu52
|