全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
楼主: hexiaojun
打印 上一主题 下一主题

[疑问] LNMP重定向出现问题了,求高手帮忙,急啊!!!!

[复制链接]
11#
 楼主| 发表于 2011-9-8 14:59:18 | 只看该作者
不要沉啊,有能帮忙的希望加下我QQ:97622019,在线等
12#
 楼主| 发表于 2011-9-8 15:18:29 | 只看该作者
求帮忙的,实在没有办法了,看来以后不能折腾了
13#
 楼主| 发表于 2011-9-8 15:26:09 | 只看该作者
网站检测了下,返回是这样的
<html>
<head><title>301 Moved Permanently</title></head>
<body bgcolor="white">
<center><h1>301 Moved Permanently</h1></center>
<hr><center>nginx/0.8.54</center>
</body>
</html>
14#
发表于 2011-9-8 15:39:49 | 只看该作者
www.cityhg.com.conf配置文件发上来。
15#
 楼主| 发表于 2011-9-8 15:55:40 | 只看该作者
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name www.cityhg.com cityhg.com;
  5.                 index index.html index.htm index.php default.html default.htm default.php;
  6.                 root  /home/wwwroot/www.cityhg.com;
  7.                

  8.                 include cityhg.conf;
  9.                 location ~ .*\.(php|php5)?$
  10.                         {
  11.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  12.                                 fastcgi_index index.php;
  13.                                 include fcgi.conf;
  14.                         }

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

  19.                 location ~ .*\.(js|css)?$
  20.                         {
  21.                                 expires      12h;
  22.                         }

  23.                 access_log off;
  24.         }
复制代码
16#
 楼主| 发表于 2011-9-8 15:55:40 | 只看该作者
  1. server
  2.         {
  3.                 listen       80;
  4.                 server_name www.cityhg.com cityhg.com;
  5.                 index index.html index.htm index.php default.html default.htm default.php;
  6.                 root  /home/wwwroot/www.cityhg.com;
  7.                

  8.                 include cityhg.conf;
  9.                 location ~ .*\.(php|php5)?$
  10.                         {
  11.                                 fastcgi_pass  unix:/tmp/php-cgi.sock;
  12.                                 fastcgi_index index.php;
  13.                                 include fcgi.conf;
  14.                         }

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

  19.                 location ~ .*\.(js|css)?$
  20.                         {
  21.                                 expires      12h;
  22.                         }

  23.                 access_log off;
  24.         }
复制代码
17#
发表于 2011-9-8 16:03:05 | 只看该作者
找到了问题,已解决;旧配置文件重复加载导致,很多人忽略了nginx.conf的配置 include vhost/*.conf;

误以为配置文件改名了,就不会加载了,而没有修改扩展名.conf,这个是不熟悉配置的朋友经常犯的错误之一。
18#
 楼主| 发表于 2011-9-8 16:07:01 | 只看该作者
希望大家不要犯和我相同的错误哦,conf文件要备份最好直接下载备份到本地或者网盘,或者改成.txt,感谢won.cc 的无私帮助
19#
发表于 2011-9-8 16:08:16 | 只看该作者
经验帖  MARK
20#
发表于 2011-9-8 16:12:02 | 只看该作者
原帖由 hotdojo 于 2011-9-8 16:08 发表
经验帖  MARK

mark +1
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-21 12:05 , Processed in 0.066402 second(s), 8 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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