Chinaunix

标题: 请教关于nginx配置域名问题 [打印本页]

作者: 李惟    时间: 2011-08-31 14:14
标题: 请教关于nginx配置域名问题
下面是我的配置信息,为什么我解析后访问是403呢?http://larchuahyde.cgfeel.com/
  1.   server
  2.   {
  3.     listen    80;
  4.     server_name    larchuahyde.cgfeel.com;
  5.     index    index.html index.htm index.php;
  6.     root    /data0/htdocs/larchuahyde;

  7.     location ~ .*\.(php|php5)?$
  8.     {
  9.       fastcgi_pass    127.0.0.1:9000;
  10.       fastcgi_index    index.php;
  11.       include      fcgi.conf;
  12.     }

  13.     location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
  14.     {
  15.       expires    30d;
  16.     }

  17.     location ~ .*\.(js|css)?$
  18.     {
  19.       expires    1h;
  20.     }

  21.     log_format  larchuahydelogs  '$remote_addr - $remote_user [$time_local] "$request" '
  22.                '$status $body_bytes_sent "$http_referer" '
  23.                '"$http_user_agent" $http_x_forwarded_for';
  24.     access_log  /data1/logs/larchuahydelogs.log  larchuahydelogs;
  25.   }
复制代码

作者: chenyx    时间: 2011-08-31 14:20
在web目录下有index.html没有?
作者: 李惟    时间: 2011-08-31 14:44
回复 2# chenyx


   
作者: 李惟    时间: 2011-08-31 14:45
奇怪了,这会有什么问题呢?
作者: chenyx    时间: 2011-08-31 14:45
你检查下nginx的日志,还有目录的权限
作者: 李惟    时间: 2011-08-31 14:50
看了下nginx.log,报告地址早已存在

2011/08/31 14:46:41 [emerg] 19282#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/08/31 14:46:41 [emerg] 19282#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/08/31 14:46:41 [emerg] 19282#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/08/31 14:46:41 [emerg] 19282#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/08/31 14:46:41 [emerg] 19282#0: bind() to 0.0.0.0:80 failed (98: Address already in use)
2011/08/31 14:46:41 [emerg] 19282#0: still could not bind()
作者: chenyx    时间: 2011-08-31 14:58
检查下什么程序在占用80口,kill掉,重启下nginx看看
作者: xiaosong_wang    时间: 2011-08-31 14:59
有其它的程序在占用80端口,请检查下有没有http进程,或是其它的nginx进程
作者: 李惟    时间: 2011-08-31 15:08
搞定了,忘了
# /usr/local/nginx/sbin/nginx -s  reload
作者: chenyx    时间: 2011-08-31 15:11
低级错误.
作者: wlforyou1    时间: 2011-09-13 09:21
你改过后,忘记重启,擦。




欢迎光临 Chinaunix (http://bbs.chinaunix.net/) Powered by Discuz! X3.2