http://wolfdream.iteye.com/blog/966903
http://www.oschina.net/question/140735_21411
目前对我很有用,学习
01 | server { |
02 | listen 80; |
03 | server_name hg.test.com; |
04 | location ~ \.(htm|html|gif|jpg|jpeg|png|ico|rar|css|js|zip|txt|flv|swf|doc|ppt|xls|pdf)$ { |
05 | root /var/data/test/webapp; |
06 | access_log off; |
07 | expires 24h; |
08 | } |
09 | location / { |
10 | proxy_pass http://localhost:10010/; |
11 | include proxy.conf; |
12 | } |
13 | } |
我的配置:
location /resources {
root E:/bak;
}
location / {
proxy_pass http://localhost:8080/;
}
Nginx配置实战
本文详细介绍了Nginx服务器的配置方法,包括静态资源的路径设置、访问日志关闭及缓存时间设定等。此外还提供了如何配置代理传递以及包含代理配置文件的具体示例。

2014

被折叠的 条评论
为什么被折叠?



