全球主机交流论坛

标题: 看看这个nginx.conf对吗 ?我怎么访问不到www/phpmyadmin目录呢 ? [打印本页]

作者: niaochen    时间: 2009-8-30 10:51
标题: 看看这个nginx.conf对吗 ?我怎么访问不到www/phpmyadmin目录呢 ?
访问的是默认的目录


server
{
   listen       80;
   server_name  yiqim.com www.yiqim.com bbs.yiqim.com;
   index index.html index.htm index.php;
   root  /home/www/phpmyadmin;

   #limit_conn   crawler  20;   

   #针对Bo-Blog系统的Rewrite静态化
   rewrite ^/post/([0-9]+).htm$ /read.php?$1 last;
   rewrite ^/post/([0-9]+)_([0-9]+).htm$ /read.php?$1&page=$2 last;
   rewrite ^/post/([0-9]+)_([0-9]+)_([0-9]+).htm$ /read.php?$1&page=$2&part=$3 last;
   rewrite ^/index_([0-9]+)_([0-9]+).htm$ /index.php?mode=$1&page=$2 last;
   rewrite ^/star_([0-9]+)_([0-9]+).htm$ /star.php?mode=$1&page=$2 last;
   rewrite ^/category_([0-9]+).htm$ /index.php?go=category_$1 last;
   rewrite ^/category_([0-9]+)_([0-9]+)_([0-9]+).htm$ /index.php?go=category_$1&mode=$2&page=$3 last;
   rewrite ^/archive_([0-9]+)_([0-9]+).htm$ /index.php?go=archive&cm=$1&cy=$2 last;
   rewrite ^/archive_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).htm$ /index.php?go=archive&cm=$1&cy=$2&mode=$3&page=$4 last;
   rewrite ^/showday_([0-9]+)_([0-9]+)_([0-9]+).htm$ /index.php?go=showday_$1-$2-$3 last;
   rewrite ^/showday_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+)_([0-9]+).htm$ /index.php?go=showday_$1-$2-$3&mode=$4&page=$5 last;

   location ~ .*\.(php|php5)?$
   {
     #将Nginx与FastCGI的通信方式由TCP改为Unix Socket。TCP在高并发访问下比Unix Socket稳定,但Unix Socket速度要比TCP快。
     fastcgi_pass  unix:/tmp/php-cgi.sock;
     #fastcgi_pass  127.0.0.1:9000;
     fastcgi_index index.php;
     include fcgi.conf;
   }

   location ~ /read.php
   {
     #将Nginx与FastCGI的通信方式由TCP改为Unix Socket。TCP在高并发访问下比Unix Socket稳定,但Unix Socket速度要比TCP快。
     fastcgi_pass  unix:/tmp/php-cgi.sock;
     #fastcgi_pass  127.0.0.1:9000;
     fastcgi_index index.php;
     include fcgi.conf;
   }
   
   #博客的图片较多,更改较少,将它们在浏览器本地缓存15天,可以提高下次打开我博客的页面加载速度。
   location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
   {
     expires      15d;
   }

   #博客会加载很多JavaScript、CSS,将它们在浏览器本地缓存1天,访问者在看完一篇文章或一页后,再看另一篇文件或另一页的内容,无需从服务器再次下载相同的JavaScript、CSS,提高了页面显示速度。
   location ~ .*\.(js|css)?$
   {
     expires      1d;
   }   

   log_format  access  '$remote_addr - $remote_user [$time_local] "$request" '
             '$status $body_bytes_sent "$http_referer" '
             '"$http_user_agent" $http_x_forwarded_for';
   access_log  /data1/logs/access.log  access;
   }
作者: cpuer    时间: 2009-8-30 10:52
想问下,你的域名绑定在 /home/www/phpmyadmin 目录?
作者: cpuer    时间: 2009-8-30 10:53
如果确实如2楼,那你有没有重新加载nginx.conf文件?
作者: niaochen    时间: 2009-8-30 10:57
我重启动了 vps
作者: niaochen    时间: 2009-8-30 10:58
我想把域名绑定在 /home/www/phpmyadmin

没有加载nginx.conf文件

因为加载不到
没有nginx.pid
作者: cpuer    时间: 2009-8-30 11:00
标题: 回复 5# 的帖子
先测试下nginx.conf规则是否有错误,

/usr/local/nginx/sbin/nginx -t

看下。
作者: niaochen    时间: 2009-8-30 11:04
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
[emerg]: open() "/data1/logs/access.log" failed (2: No such file or directory)
configuration file /usr/local/nginx/conf/nginx.conf test failed
作者: niaochen    时间: 2009-8-30 11:05
测试失败
作者: niaochen    时间: 2009-8-30 11:07
什么地方出问题了啊
作者: cpuer    时间: 2009-8-30 11:08
标题: 回复 7# 的帖子
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
[emerg]: open() "/data1/logs/access.log" failed (2: No such file or directory)
configuration file /usr/local/nginx/conf/nginx.conf test failed

都已经有错误提示,说你的nginx.conf 有错误。

[emerg]: open() "/data1/logs/access.log" failed (2: No such file or directory)

/data1/logs/access.log 不存在这样的目录和文件。
作者: niaochen    时间: 2009-8-30 11:18
应该怎么处理啊
作者: niaochen    时间: 2009-8-30 11:21
晕,,没改目录
作者: cpuer    时间: 2009-8-30 11:23
原帖由 cpuer 于 2009-8-30 11:08 发表
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
[emerg]: open() "/data1/logs/access.log" failed (2: No such file or directory)
configuration file /usr/local/nginx/conf/nginx.conf  ...


我记得如果一键安装包的话access日志的默认路径不是/data1/logs/access.log 的,应该是/home/logs/access.log  不知道你怎么乱改了,改回去就好了。
作者: cpuer    时间: 2009-8-30 11:24
原帖由 niaochen 于 2009-8-30 11:21 发表
晕,,没改目录



作者: niaochen    时间: 2009-8-30 11:25
恩 ,,原来的我备份了一份的 ,,
作者: niaochen    时间: 2009-8-30 11:26
要重新加载吗 ?
作者: niaochen    时间: 2009-8-30 11:27
the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful
作者: cpuer    时间: 2009-8-30 11:29
标题: 回复 17# 的帖子
这样提示说明nginx.conf文件没有错误了,kill -HUP `cat /usr/local/nginx/logs/nginx.pid`  这样重新加载下nginx.conf就好了
作者: niaochen    时间: 2009-8-30 11:29
kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec]
作者: niaochen    时间: 2009-8-30 11:30
usr/local/nginx/logs/目录下没有 nginx.pid
作者: cpuer    时间: 2009-8-30 11:34
标题: 回复 20# 的帖子
那你到/ 目录下 cd /
然后find -name nginx.pid

看下nginx.pid 在哪。

不然就重启nginx, /usr/local/nginx/sbin/nginx
作者: niaochen    时间: 2009-8-30 11:36
恩 重启看看
作者: cpuer    时间: 2009-8-30 11:37
标题: 回复 22# 的帖子
嗯嗯。
作者: niaochen    时间: 2009-8-30 11:38
重启了,,还是没定位到 phpmyadmin目录

server
{
   listen       80;
   server_name  yiqim.com www.yiqim.com bbs.yiqim.com;
   index index.html index.htm index.php;
   root  /home/www/phpmyadmin;

   #limit_conn   crawler  20;   


这应该没错吧
作者: cpuer    时间: 2009-8-30 11:41
标题: 回复 24# 的帖子
晕,我访问你的www. yiqim.com 页面,打开的竟然是Apache的默认页
你要卸载掉Apache先,yum remove httpd
作者: niaochen    时间: 2009-8-30 11:42
好的
作者: niaochen    时间: 2009-8-30 11:43
卸载后,,要不要启动 什么
作者: niaochen    时间: 2009-8-30 11:45
nginx/0.7.61
作者: cpuer    时间: 2009-8-30 11:46
标题: 回复 27# 的帖子
卸载后再启动nginx,      /usr/local/nginx/sbin/nginx
作者: niaochen    时间: 2009-8-30 11:46
502 Bad Gateway

--------------------------------------------------------------------------------

nginx/0.7.61


晕倒
作者: niaochen    时间: 2009-8-30 11:47
是,,启动了 ,,环境应该是正确的了
作者: cpuer    时间: 2009-8-30 11:47
标题: 回复 30# 的帖子
502 Bad Gateway

先重启看下。
作者: niaochen    时间: 2009-8-30 11:49
好的
作者: niaochen    时间: 2009-8-30 11:54
reboot 不会是关闭的命令吧 ,,2次重启 都失败,,我晕,又要麻烦IDC了
作者: cpuer    时间: 2009-8-30 11:55
标题: 回复 34# 的帖子
reboot是重启命令。

VPS经常会出现重启失灵现象。
作者: niaochen    时间: 2009-8-30 13:47
标题: 还是不行,,我晕 502错误
还是不行,,我晕 502错误
作者: cpuer    时间: 2009-8-30 13:50
标题: 回复 36# 的帖子
参照 http://blog.s135.com/post/361  看下是否能修正,不行的话重装系统重装吧
作者: niaochen    时间: 2009-8-30 13:55
静态页面行,,动态不行,,我晕
作者: cpuer    时间: 2009-8-30 14:04
标题: 回复 38# 的帖子
跟php有关,不知道哪里设置有问题。
作者: niaochen    时间: 2009-8-30 14:09
我晕
我安装了一键包以后又没动过
作者: cpuer    时间: 2009-8-30 14:12
标题: 回复 40# 的帖子
一键安装包我自己也安装测试过,默认没有出过502 bad gateway,
作者: bluesky    时间: 2009-8-30 14:16
一键包有好多版本
作者: cpuer    时间: 2009-8-30 14:54
标题: 回复 42# 的帖子
论坛帖子置顶的那个版本我是测试过的,不过楼主的安装很奇怪,连nginx.pid都不在/usr/local/nginx/logs/nginx.pid
作者: niaochen    时间: 2009-8-30 16:00
不知道啊 ,,我晕了 ,,
叫他们重装系统,,

他们问我出什么问题了,可以帮我解决 ,,
我都不会描述问题,,

还有他们的vps 用reboot 启动了3次 3次都启动不了~~
作者: cpuer    时间: 2009-8-30 16:22
标题: 回复 44# 的帖子
重装系统问理由只要回复 hi,I am sorry,the system is broken,so please rebuild it,thx
作者: cpuer    时间: 2009-8-30 16:22
reboot 起不来好像是通病,偶尔发生。
作者: zyypp    时间: 2009-8-30 17:46
找不到 nginx.pid 可以看 nginx.conf 里面的 配置 就在 开头 7行左右
作者: cpuer    时间: 2009-8-30 17:49
标题: 回复 47# 的帖子
第四行
作者: zyypp    时间: 2009-8-30 17:51
标题: 回复 48# 的帖子
你那是 把 空行删了 是在第四行呵呵
作者: cpuer    时间: 2009-8-30 19:29
标题: 回复 49# 的帖子
空行我都删掉的,影响视觉
作者: zyypp    时间: 2009-8-30 21:02
标题: 回复 50# 的帖子
我习惯 用 空行 分段 呵呵
作者: cpuer    时间: 2009-8-30 21:05
标题: 回复 51# 的帖子
看来我弄得比较乱
作者: zyypp    时间: 2009-8-30 21:39
标题: 回复 52# 的帖子
....................
作者: cpuer    时间: 2009-8-30 22:00
标题: 回复 53# 的帖子





欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) Powered by Discuz! X3.4