|
大家好,我用LuManager 来管理的VPS 新建网站以后,修改Apache相关的Apache和Nginx处理选择时,每日次都会提示如下问题:
您填写的内容有错,错误信息
nginx: [emerg] host not found in upstream "4.lum" in /usr/local/nginx/conf/vhost.test.conf:151 nginx: configuration file /usr/local/nginx/conf/vhost.test.conf test failed
和修改网站转向时,也会提示错误.
您填写的内容有错,错误信息
nginx: [emerg] invalid condition "$host" in /usr/local/nginx/conf/vhost.test.conf:69 nginx: configuration file /usr/local/nginx/conf/vhost.test.conf test failed
我问过爱洞特漏 说:新建的时候,不要使用apache,建好,再编辑的时候,再用apache
我试了一遍,也是提示这个错误..
还有就是我新建了子站,绑定了域名,也解析了,经测试,解析到的也是我的IP,可是访问就是提示无法访问..
现在我把他排到第一位了,也是无法解决!!!
顺便贴一下我的 vhost.test.conf
user daemon;
worker_processes 4;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
pid logs/nginx.pid;
events {
worker_connections 65535;
}
http {
include mime.types;
default_type application/octet-stream;
log_format lu_access_log_1 '$remote_addr --- [$time_local] --- Bytes: $body_bytes_sent --- $request --- $status --- $http_referer';
log_format lu_access_log_2 '$remote_addr --- [$time_local] --- Bytes: $body_bytes_sent --- $request --- $status --- $http_referer --- $http_user_agent --- $http_x_forwarded_for --- $remote_user';
#access_log /dev/null combined;
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
tcp_nodelay on;
#keepalive_timeout 0;
keepalive_timeout 120;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 32k;
fastcgi_buffers 4 32k;
fastcgi_busy_buffers_size 32k;
fastcgi_temp_file_write_size 64k;
server_names_hash_bucket_size 128;
client_max_body_size 2000M;
limit_zone one $binary_remote_addr 16m;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 12k;
gzip_comp_level 3;
gzip_types text/plain application/x-javascript text/css application/xml;
#include vhost_default.conf;
server {
server_name bbs.legouzaixian.com bbs.legouzaixian.cn *.legouzaixian.com ;
listen 80;
#鐢ㄦ埛璁よ瘉
# ------------ 301鍜?02杞?悜
if ($host != ) {
rewrite ^/(.*)$ bbs.legouzaixian.com/$1 permanent;
}
# ------------
if (-d $request_filename) {
rewrite ^/(.*)([^/])$ $scheme://$host/$1$2/ permanent;
}
# ------------
# ------------
# # set $index '';
# # if ($uri ~ /$ ){
# # rewrite (.*) $uri$index redirect;
# # }
# location ~ \.()$ {
#1
# root /home/ftp/1520/jnlgzx_vicp_net-20110801-EXS/jnlgzx_vicp_net/bbs/;
# proxy_store on;
# proxy_temp_path "/home/ftp/1520/jnlgzx_vicp_net-20110801-EXS/jnlgzx_vicp_net/bbs/";
# proxy_store_access user:rw group:rw all:rw;
#2
# proxy_cache mem_cache_4;
# if (!-e $request_filename) {
# proxy_pass ;
# }
# include proxy_pass.conf;
# }
# location ~ (?!)$ {
# proxy_pass ;
# include proxy_pass.conf;
# }
## location ~ /purge(/.*) {
## allow all;
## allow 127.0.0.1;
## deny all;
## proxy_cache_purge mem_cache_4 $1$is_args$args;
## }
# ------------
# /var/log/nginx_vhost_log/4_error.log info;
# /var/log/nginx_vhost_log/4_access.log lu_#_1;
error_page 403 /__ErrorFiles__/403.html;
error_page 404 /__ErrorFiles__/404.html;
error_page 500 /__ErrorFiles__/500.html;
error_page 501 /__ErrorFiles__/501.html;
error_page 502 /__ErrorFiles__/502.html;
root /home/ftp/1520/jnlgzx_vicp_net-20110801-EXS/jnlgzx_vicp_net/bbs/;
ssi off;
ssi_silent_errors off;
ssi_types text/shtml;
location / {
index index.html index.htm index.shtml index.php;
autoindex off;
# proxy_pass ;
# proxy_set_header Host $host;
# include proxy_pass.conf;
}
location /nginx_status {
stub_status on;
# off;
}
#------------
location ~* \.(php[3-9]?|phtm[l]?)(\/.*)*$ {
# proxy_set_header Host $host;
# include proxy_pass.conf;
fastcgi_pass 127.0.0.1:9000;
include enable_php.conf;
}
location ~ /\.ht {
return 403;
}
location ~ ssl.(key|crt)$ {
return 403;
}
location ~ (favicon.ico|robots.txt) {
expires 1d;
log_not_found off;
# off;
break;
}
location ~* \.(gif|jpg|jpeg|png|bmp|swf)$ {
#expires 6h;
expires 6h;
break;
}
location ~* \.(js|css)$ {
expires 1h;
break;
}
}
#the end
}
第一次发帖..希望大家能帮忙解决一下问题!!谢谢!!
|
|