VPS侦探论坛

 找回密码
 注册
查看: 3155|回复: 1

军哥,301跳转出现问题

[复制链接]
发表于 2018-9-12 08:58:15 | 显示全部楼层 |阅读模式

我搜索了论坛,没有找到可以解决问题的答案.我用的1.5版本,加了301跳转代码后,网站打不开了,请军哥指正:以下红色字体,对不?

server
    {
        listen 80;
        #listen [::]:80;
        server_name www.tanghui.org tanghui.org;
        RewriteCond %{HTTP_HOST} ^tanghui.org$ [NC]
        RewriteRule ^(.*)$ http://www.tanghui.org/$1 [L,R=301]
        index index.html index.htm index.php default.html default.htm default.php;
        root  /home/wwwroot/default;

        include rewrite/wordpress.conf;
        #error_page   404   /404.html;

        # Deny access to PHP files in specific directory
        #location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; }

        include enable-php.conf;

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

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

        location ~ /.well-known {
            allow all;
        }

        location ~ /\.
        {
            deny all;
        }

        access_log off;
    }
美国VPS推荐: 遨游主机LinodeLOCVPS主机云搬瓦工80VPSVultr美国VPS主机中国VPS推荐: 阿里云腾讯云。LNMP付费服务(代装/问题排查)QQ 503228080
发表于 2018-9-12 13:55:35 | 显示全部楼层


windows的程序能否直接在linux运行?
一样的道理apache的配置加到nginx上能运行不?
官网上301的教程都写过很多年了,自己搜索一下就能找到
Linux下Nginx+MySQL+PHP自动安装工具:https://lnmp.org
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-6 23:18 , Processed in 0.025630 second(s), 16 queries .

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

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