Home  >  Article  >  Operation and Maintenance  >  How to configure nginx default site

How to configure nginx default site

王林
王林forward
2023-05-22 21:01:051502browse

Configuring the default site

server {
 listen 80 default;
}

When multiple virtual hosts are created on an nginx service, it will be searched from top to bottom by default. If no virtual host is matched, it will Returns the content of the first virtual host. If you want to specify a default site, you can place the virtual host of this site at the location of the first virtual host in the configuration file, or configure listen default# on the virtual host of this site. ##

The above is the detailed content of How to configure nginx default site. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:yisu.com. If there is any infringement, please contact admin@php.cn delete