VPS侦探论坛

 找回密码
 注册
查看: 14195|回复: 6

关于301的问题

[复制链接]
发表于 2010-12-30 22:06:56 | 显示全部楼层 |阅读模式

主机不加IP的时候用;
server {
server_name 114466.cn;
rewrite ^(.*) http://www.114466.cn$1 permanent;
}

定向成功,加了IP就不起作用了,请问是什么问题?

server
{
  listen       184.82.6.22:80;
  server_name www.114466.cn;
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2010-12-31 10:07:49 | 显示全部楼层

回复 1# 的帖子



改成listen 80;
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2010-12-31 18:05:19 | 显示全部楼层

老大还是不行,也重启过了

server
        {
                listen       184.82.6.35 80;
                server_name www.cu25.info;
                index index.html index.htm index.php default.html default.htm default.php;
                root  /home/wwwroot/www.cu25.info;

                include none.conf;
                location ~ .*\.(php|php5)?$
                        {
                                fastcgi_pass  unix:/tmp/php-cgi.sock;
                                fastcgi_index index.php;
                                include fcgi.conf;
                        }

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

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

                access_log off;
        }

server {
server_name cu25.info;
rewrite ^(.*) http://www.cu25.info$1 permanent;
}
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
 楼主| 发表于 2011-1-1 14:39:10 | 显示全部楼层



麻烦军哥看看!!!!
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
 楼主| 发表于 2011-1-3 10:57:56 | 显示全部楼层

军哥一直没有解决,麻烦看看!

军哥运维代购:http://shop63846532.taobao.com/

发表于 2011-1-3 13:10:00 | 显示全部楼层

回复 5# 的帖子


server {
listen 80;
server_name cu25.info;
rewrite ^(.*) http://www.cu25.info$1 permanent;
}


再 /usr/local/nginx/sbin/nginx -t 看一下
 楼主| 发表于 2011-1-4 14:16:33 | 显示全部楼层

the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
configuration file /usr/local/nginx/conf/nginx.conf test is successful

老大,是这个提示

listen 80;
这里加上IP好像就OK了!
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|Archiver|VPS侦探 ( 鲁ICP备16040043号-1 )

GMT+8, 2024-5-20 07:42 , Processed in 0.027634 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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