0
這裏是我的配置工作: nginx.confNginx的不與網站-avaliable
user www-data;
worker_processes 2;
error_log /var/log/nginx/error.log warn;
pid /var/run/nginx.pid;
worker_rlimit_nofile 8192;
events {
worker_connections 1024;
use epoll;
}
http {
client_max_body_size 15m;
server_names_hash_bucket_size 64;
postpone_output 1460;
sendfile_max_chunk 128k;
sendfile on;
fastcgi_cache_path /tmp/fcgi-cache/ levels=1:2 keys_zone=one:10m;
include /etc/nginx/mime.types;
default_type application/octet-stream;
server_tokens off;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"';
access_log /var/log/nginx/access.log main;
error_log /var/log/nginx/error.log;
tcp_nopush on;
keepalive_timeout 65;
gzip on;
ssi on;
include /etc/nginx/conf.d/*.conf;
include /etc/nginx/sites-enabled/*;
}
這裏是我的domain.com配置站點可用:
server {
root /var/www/domain.com/;
access_log /var/log/nginx/default-access.log;
error_log /var/log/nginx/default-error.log;
include /etc/nginx/templates/default;
include /etc/nginx/templates/php;
include /etc/nginx/templates/phpmyadmin;
}
當我輸入一個url domain.com它顯示默認的nginx頁面。當我評論包括/etc/nginx/conf.d/*.conf;我甚至無法加載nginx頁面,它像服務器甚至不工作。我在網站上編寫了我的網站 - 可用,併爲網站啓用了一個ln -s。 有什麼不對?
在啓用站點啓用-s後,您是否重新加載了?另外,您確定啓用網站的文件中沒有任何重複的'server_name'設置? – jagsler 2013-02-12 08:07:35