小编sal*_*fek的帖子

如何修复 nginx 配置上的“404 not found”错误

我刚刚在 debian 上安装了 nginx,并在 nginx.conf 文件中进行了基本配置(添加服务器部分)

user www-data;
worker_processes  1;

error_log  /var/log/nginx/error.log;
pid        /var/run/nginx.pid;

events {
    worker_connections  1024;
    # multi_accept on;
}

http {
    include       /etc/nginx/mime.types;
    default_type application/octet-stream;
    access_log  /var/log/nginx/access.log;

    sendfile        on;
    #tcp_nopush     on;

    #keepalive_timeout  0;
    keepalive_timeout  65;
#    tcp_nodelay        on;

#    gzip  on;
#    gzip_disable "MSIE [1-6]\.(?!.*SV1)";

#    include /etc/nginx/conf.d/*.conf;
#    include /etc/nginx/sites-enabled/*;

    server {
        listen 80;
        server_name localhost;
        location / {
                root html;
                index index.html index.htm;
        }
        error_page 500 502 503 504 /50x.html;
        location = /50x.html {
                root …
Run Code Online (Sandbox Code Playgroud)

nginx http-status-code-404

4
推荐指数
1
解决办法
6万
查看次数

标签 统计

http-status-code-404 ×1

nginx ×1