全球主机交流论坛

标题: nginx如下问题如何解决 [打印本页]

作者: chinanbman    时间: 2016-3-5 22:13
标题: nginx如下问题如何解决
本帖最后由 chinanbman 于 2016-3-6 16:09 编辑




出现了 [emerg] invalid condition "$host!=" in /home/wwwroot/justicexjp/vhost/killxjp.com.conf:6

作者: qweasdzxc123    时间: 2016-3-5 22:15
先学学如何发图片
作者: sense    时间: 2016-3-5 22:21
图片不能显示
作者: 小七    时间: 2016-3-5 22:49
无图                 
作者: Dk2014    时间: 2016-3-5 22:50
让我绕老师教你发图
作者: chinanbman    时间: 2016-3-5 23:02
qweasdzxc123 发表于 2016-3-5 22:15
先学学如何发图片

求教如何发图
作者: chinanbman    时间: 2016-3-5 23:04
如图
作者: chinanbman    时间: 2016-3-5 23:05
chinanbman 发表于 2016-3-5 23:04
如图

发不了图
作者: chinanbman    时间: 2016-3-5 23:07
nginx:[emerg] invalid condition
作者: opelnic    时间: 2016-3-5 23:26
哪里有图片?
作者: chinanbman    时间: 2016-3-6 16:09
出现了 [emerg] invalid condition "$host!=" in /home/wwwroot/justicexjp/vhost/killxjp.com.conf:6
作者: 欧阳逍遥    时间: 2016-3-6 16:11
chinanbman 发表于 2016-3-6 16:09
出现了 [emerg] invalid condition "$host!=" in /home/wwwroot/justicexjp/vhost/killxjp.com.conf:6

/home/wwwroot/justicexjp/vhost/killxjp.com.conf
把配置文件发出来吧。  
作者: chinanbman    时间: 2016-3-6 16:15
欧阳逍遥 发表于 2016-3-6 16:11
/home/wwwroot/justicexjp/vhost/killxjp.com.conf
把配置文件发出来吧。

server
{
        listen 80 default; #listen end
        server_name killxjp.com; #server_name end
        if ( $host!= 'killxjp.com' )
        {
        rewrite ^/(.*)$ http://killxjp.com/$1 permanent;
        }
        index index.html index.htm index.php; #index end

        set $subdomain '';
        root  /home/wwwroot/justicexjp/domain/killxjp.com/web$subdomain;
        include /home/wwwroot/justicexjp/rewrite/amh.conf; #rewrite end

        #error_page
        error_page 400 /ErrorPages/400.html;
        error_page 403 /ErrorPages/403.html;
        error_page 404 /ErrorPages/404.html;
        error_page 502 /ErrorPages/502.html;
        location ~ /ErrorPages/(400|401|403|404|405|502|503)\.html$
        {
                root /home/wwwroot/justicexjp/domain/killxjp.com/web;
        }
    location ~ .*\.php$
        {
                fastcgi_pass  unix:/tmp/php-cgi-justicexjp-killxjp.com.sock;
                fastcgi_index index.php;
                include fcgi.conf;
                fastcgi_param DOCUMENT_ROOT  /home/wwwroot/justicexjp/domain/killxjp.com/web$subdomain;
                fastcgi_param SCRIPT_FILENAME  /home/wwwroot/justicexjp/domain/killxjp.com/web$subdomain$fastcgi_script_name;
        }

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

        location ~ .*\.(js|css)$
        {
                expires      12h;
        }
access_log /home/wwwroot/justicexjp/logs/killxjp.com-access.log combined; #access_log end
        error_log /dev/null; #error_log end
}

作者: 欧阳逍遥    时间: 2016-3-6 16:32
chinanbman 发表于 2016-3-6 16:15
server
{
        listen 80 default; #listen end

if ( $host!= 'killxjp.com' )  if和后面括号以及变量等号这些元素都要有空格




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