用这样的配置
http://img2.tuchuang.org/uploads/2014/08/conf.PNG
访问网站还是默认的apache test page
server {
#listen XXX.XXX.51.6:80;
listen [XXXX:XXXX:1:1::1:321]:80;
server_name XXX.tk;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# root html;
# index index.html index.htm;
proxy_pass http://www.yahoo.com/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
nginx version: nginx/1.7.3
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
configure arguments: --prefix=/opt/nginx --with-http_stub_status_module --add-module=/root/ngx_http_substitutions_filter_module/ --with-ipv6
求大神帮忙! 谢谢
http://img2.tuchuang.org/uploads/2014/08/conf.PNG
访问网站还是默认的apache test page
server {
#listen XXX.XXX.51.6:80;
listen [XXXX:XXXX:1:1::1:321]:80;
server_name XXX.tk;
#charset koi8-r;
#access_log logs/host.access.log main;
location / {
# root html;
# index index.html index.htm;
proxy_pass http://www.yahoo.com/;
proxy_redirect off;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
nginx version: nginx/1.7.3
built by gcc 4.1.2 20080704 (Red Hat 4.1.2-54)
configure arguments: --prefix=/opt/nginx --with-http_stub_status_module --add-module=/root/ngx_http_substitutions_filter_module/ --with-ipv6
求大神帮忙! 谢谢