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!