First find out where the configuration file is whereis nginx.conf You can look through these directories to see where the configuration files are. The correct directory here is /etc/nginx Next, find the real configuration file cd to the /etc/nginx directory When I opened it, I was confused. Where was the line "listen 80"? But don’t worry, listen 80 is definitely there, it’s just not included here. Look, isn't there an include file? Who knows in there. OK, then go and see what's in the sites-enabled folder Well, this file points to site-available/default again But develop a good habit and back up before modifying cp default default_backup Errata: This should be cp default ../default_backup, otherwise when including, the * in this directory will be used, and the backup will also be treated as a configuration file Generally, 80 is changed to 81, but it can be changed to something else. This is the end of this article on how to modify the default port of nginx. For more information about how to modify the default port of nginx, please search for previous articles on 123WORDPRESS.COM or continue to browse the related articles below. I hope you will support 123WORDPRESS.COM in the future! You may also be interested in:
|
<<: Implementation of dynamic rem for mobile layout
>>: The iframe refresh method is more convenient
This article shares the specific code of js to ac...
Today is 618, and all major shopping malls are ho...
I have encountered many problems in learning Dock...
As a backend programmer, sometimes I have to tink...
This article shares the specific code of JavaScri...
<textarea></textarea> is used to crea...
Copy code The code is as follows: <frameset co...
This article example shares the specific code of ...
Table of contents v-model .sync The difference in...
Code: Copy code The code is as follows: <!DOCTY...
This article example shares the specific code of ...
like LIKE requires the entire data to match, whil...
Currently, most CPUs support floating-point units...
The container has already been created, how to kn...
Swap space is a common aspect of computing today,...