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

How to bind a domain name in a nginx service

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

Share

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

How to bind a domain name in a nginx service? I believe that many inexperienced people are at a loss about this, so this article summarizes the causes and solutions of the problem. Through this article, I hope you can solve this problem.

1. A string that begins with a * wildcard:

Server_name * .domain.com

2. Characters that end with a * wildcard

Server_name www.*

3. Match regular expressions

Server_name ~ ^ (?. +). Domain.com$;server {listen 80 default_server; server_name www.123.com; root / home/web1; location / {} error_page 404 / 404.html; location = / 40x.html {} error_page 500502 503504 / 50.xhml; location = / 50x.html {} server {server_name www.abc.com; root / home/web2 Location / {} error_page 404 / 404.html; location = / 40x.html {} error_page 500502503504 / 50x.html; location = / 50x.html {}} after reading the above, do you know how to bind the domain name in the nginx service? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

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