我正在尝试为某人设置一个Nginx Web服务器,而且目前的configuration似乎没有问题。 / var / www / html / ender肯定有一个WHMCS安装位于其中,但每次我尝试访问它,网页给我一个404错误。 我有符号链接的目录,但似乎仍然有一个潜在的错误。 附加的是hastebin,下面是当前的NGINXconfiguration块,减去域名。 (Ubuntu 16.04与NGINX)
server { listen 80; server_name DELETED_DOMAIN; return 301 https://$server_name$request_uri; } server { listen 443 ssl http2; server_name DELETED_DOMAIN; root /var/www/html/ender; index index.php index.html index.htm; # allow larger file uploads and longer script runtimes client_max_body_size 100m; client_body_timeout 120s; sendfile off; # strengthen ssl security ssl_certificate /etc/letsencrypt/live/DELETED_DOMAIN/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/DELETED_DOMAIN/privkey.pem; ssl_protocols TLSv1 TLSv1.1 TLSv1.2; ssl_prefer_server_ciphers on; ssl_session_cache shared:SSL:10m; ssl_ciphers "EECDH+AESGCM:EDH+AESGCM:ECDHE-RSA-AES128-GCM-SHA256:AES256+EECDH:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4"; # Add stdout logging location / { # First attempt to serve request as file, then # as directory, then fall back to index.html try_files $uri $uri/ /index.php?q=$uri&$args; } error_page 404 /404.html; error_page 500 502 503 504 /50x.html; location = /50x.html { } # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000 # location ~ \.php$ { try_files $uri =404; fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass localhost:9000; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_param SCRIPT_NAME $fastcgi_script_name; fastcgi_index index.php; include fastcgi_params; } location ~* \.(jpg|jpeg|gif|png|css|js|ico|xml)$ { expires 5d; } # deny access to . files, for security # location ~ /\. { log_not_found off; deny all; } }
https://hastebin.com/lehijuqene.nginx