How to configure nginx default site

王林
Release: 2023-05-22 21:01:05
forward
1538 people have browsed it

Configuring the default site

server {
 listen 80 default;
}
Copy after login

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!

Related labels:
source:yisu.com
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template