开发者社区> 问答> 正文

Nginx root配置问题:配置报错

http {
    include       mime.types;
    default_type  application/octet-stream;
    sendfile        on;
    keepalive_timeout  65;
    gzip  on;
    server {
        listen       80;
        server_name  localhost;
        #charset koi8-r;
        #access_log  logs/host.access.log  main;
	
		
		location = / {
			root D:/wangkai/project/idea/site/src;
			index index.html;
		}

        #error_page  404              /404.html;

        # redirect server error pages to the static page /50x.html
        #
        error_page   500 502 503 504  /50x.html;
        location = /50x.html {
            root   html;
        }
    }

}
http配置片段 结果访问还是nginx默认首页  log也没错  求解

展开
收起
kun坤 2020-06-03 17:47:05 586 0
1 条回答
写回答
取消 提交回答
  • 为啥技术论坛社区都这么不活跃。。。 八卦新闻一堆人评论,。。。。######回复 @w18671971280 : 66666######......还好自己解决了

    2020-06-04 11:06:37
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
《Nginx 代理系统常用手册》 立即下载
CentOS Nginx PHP JAVA 多语言镜像使用手 立即下载
CentOS Nginx PHP JAVA多语言镜像使用手册 立即下载