Nginx静态网页最简配置

server{listen80;server_namewww.fcibook.com;location/{root/usr/local/web/www/;indexindex.html;}}其中:li

by
江江
on
2018/11/04
server {
        listen       80;
        server_name  www.fcibook.com;

        location / {
            root /usr/local/web/www/;
            index index.html;
        }
}

其中:

listen为端口号

server_name为网页地址,或者IP

location中的root指定本地静态网页目录

江江江江于 2026-10-15 01:32:56 修改阅读 526评论 0点赞 0