一直跑着的论坛是配置在主文件中的,配置项挪到虚拟主机后,用户头像及后台UCenter访问都是403,有遇到这种问题的嘛,配置内容如下的: server { listen 80 ; server_name www.acgcommittee.com; # default; index index.html index.htm index.php ; root /usr/local/http/discuz; access_log /usr/local/nginx/logs/access.log acgcommittee; location ~ \.php$ { include fastcgi_params; fastcgi_pass 127.0.0.1:9000; fastcgi_index index.php ; fastcgi_param SCRIPT_FILENAME /usr/local/http/discuz$fastcgi_script_name ; } location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$ { expires 14d; access_log off; } location ~ (static|cache) { access_log off; } location ~ \.(js|css) { expires 2h; access_log off; } location ~*^.+\.(gif|jpg|jpeg|png|swf|fiv|rar|zip|doc|pdf|gz|bz2|bmp|xls)$ { valid_referers none blocked .*acgcommittee.com *.taobao.com *.baidu.com *.g oogle.com *.google.cn *.soso.com; if ($invalid_referer) { # rewrite ^/ http://www.acgcommittee.com/403.html; return 403; # rewrite ^/ http://www.acgcommittee.com/nophoto.gif; } } } |
编辑回复