出现了 invalid condition "$host!=" in /home/wwwroot/justicexjp/vhost/killxjp.com.conf:6
/home/wwwroot/justicexjp/vhost/killxjp.com.conf
把配置文件发出来吧。 欧阳逍遥 发表于 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_passunix:/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
}
chinanbman 发表于 2016-3-6 16:15
server
{
listen 80 default; #listen end
if ( $host!= 'killxjp.com' )if和后面括号以及变量等号这些元素都要有空格
页:
1
[2]