全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

IP归属甄别会员请立即修改密码
查看: 13551|回复: 53
打印 上一主题 下一主题

看看这个nginx.conf对吗 ?我怎么访问不到www/phpmyadmin目录呢 ?

[复制链接]
跳转到指定楼层
1#
发表于 2009-8-30 10:51:00 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
访问的是默认的目录


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;
   }
2#
发表于 2009-8-30 10:52:14 | 只看该作者
想问下,你的域名绑定在 /home/www/phpmyadmin 目录?
3#
发表于 2009-8-30 10:53:56 | 只看该作者
如果确实如2楼,那你有没有重新加载nginx.conf文件?
4#
 楼主| 发表于 2009-8-30 10:57:28 | 只看该作者
我重启动了 vps
5#
 楼主| 发表于 2009-8-30 10:58:35 | 只看该作者
我想把域名绑定在 /home/www/phpmyadmin

没有加载nginx.conf文件

因为加载不到
没有nginx.pid
6#
发表于 2009-8-30 11:00:08 | 只看该作者

回复 5# 的帖子

先测试下nginx.conf规则是否有错误,

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

看下。
7#
 楼主| 发表于 2009-8-30 11:04:32 | 只看该作者
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
8#
 楼主| 发表于 2009-8-30 11:05:09 | 只看该作者
测试失败
9#
 楼主| 发表于 2009-8-30 11:07:33 | 只看该作者
什么地方出问题了啊
10#
发表于 2009-8-30 11:08:22 | 只看该作者

回复 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 不存在这样的目录和文件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2025-10-30 08:40 , Processed in 0.066355 second(s), 9 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表