这是我的配置: nginx.conf
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。怎么了?