首页 > 其他 > 详细

Nginx配置文件nginx.conf部分说明

时间:2020-03-14 13:49:31      阅读:40      评论:0      收藏:0      [点我收藏+]

配置文件

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;

    keepalive_timeout  65;

    server {
        listen       80;    #默认端口号
        server_name  localhost;  #域名或者IP

        location / {
            root   html;    #默认访问资源的目录
            index  index.html index.htm;    #默认访问目录下的资源名称
        }
        error_page   500 502 503 504  /50x.html;  #错误页面
        location = /50x.html {
            root   html;
        }

    }

 重新加载配置文件,使配置立即生效

nginx -s reload

Nginx配置文件nginx.conf部分说明

原文:https://www.cnblogs.com/zxh06820/p/12491730.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!