Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Nginx virtual host configuration

2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

Multiple sites, that is, multiple domain names, run on a machine

Nginx default virtual host

# No matter what domain name is resolved to the server, the default virtual host will be accessed

# the first server {} in nginx.conf

# or listen 80 default_server

# Universal parsing * .aming.com

Nginx virtual host configuration specification

# Master profile include virtual host configuration file

# create a vhost directory under the conf directory, and define the virtual host configuration under the vhosts directory

Nginx port-based virtual host

# server_name can be the same if the listen port is different

Post several configuration files for the test environment

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report