nginx基本配置

nginx基本配置

nginx的基本配置和虚拟主机的配置

Nginx的基本配置

Nginx的主配置文件是:nginx.conf

nginx.conf 主要组成如下:

在Nginx配置文件(nginx.conf)中,一个最简化的虚拟主机配置代码如下:

http {
        server {
                listen 80 default-server;
                server_name abc.com;
                root /var/share/www/site1;
                
                location / {
                        index index.html;
                }
        }
}

原文地址:https://www.cnblogs.com/wodetian/p/5658465.html