nginx配置问题

2012-04-12 13:42:37 +08:00
 zhfsxtx
在公司可以SSH到我家里的机器上面,但是NGNIX一直访问不了,在家里则可以访问

这是我的NGNIX配置,有什么问题吗
server {
#listen 80; ## listen for ipv4; this line is default and implied
#listen [::]:80 default ipv6only=on; ## listen for ipv6

root /home/hh/www;
index index.php index.html index.htm;

# Make site accessible from http://localhost/
server_name 113.77.206.42;
listen 80;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to index.html
try_files $uri $uri/ /index.html;

allow all;
}


location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}

location /images {
root /usr/share;
autoindex off;
}

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 /usr/share/nginx/www;
#}

# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
# proxy_pass http://127.0.0.1;
#}

# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/nginx-default$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}

# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
3178 次点击
所在节点    服务器
4 条回复
zhfsxtx
2012-04-12 13:55:50 +08:00
好郁闷啊
jint
2012-04-12 14:08:26 +08:00
不要用80端口,换个比较大的不常用的端口试试。
honk
2012-04-12 14:17:37 +08:00
@jint +1 ISP通常會封80
zhfsxtx
2012-04-12 14:25:26 +08:00
@jint
@honk
太感谢LS两位了,原来ISP通常會封80

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/32048

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX