Chinaunix
标题:
请教关于nginx配置域名问题
[打印本页]
作者:
李惟
时间:
2011-08-31 14:14
标题:
请教关于nginx配置域名问题
下面是我的配置信息,为什么我解析后访问是403呢?
http://larchuahyde.cgfeel.com/
server
{
listen 80;
server_name larchuahyde.cgfeel.com;
index index.html index.htm index.php;
root /data0/htdocs/larchuahyde;
location ~ .*\.(php|php5)?$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
}
location ~ .*\.(js|css)?$
{
expires 1h;
}
log_format larchuahydelogs '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" $http_x_forwarded_for';
access_log /data1/logs/larchuahydelogs.log larchuahydelogs;
}
复制代码
作者:
chenyx
时间:
2011-08-31 14:20
在web目录下有index.html没有?
作者:
李惟
时间:
2011-08-31 14:44
回复
2#
chenyx
you.jpg
(5.43 KB, 下载次数: 22)
下载附件
2011-08-31 14:44 上传
作者:
李惟
时间:
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