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 summarizes some simple principles of...
Table of contents Install Dependencies Configurat...
MySQL is a very powerful relational database. How...
Today I received a disk warning notification from...
I have always wanted to learn about caching. Afte...
1. Download the tomcat image docker pull tomcat:8...
MySQL Boolean value, stores false or true In shor...
1. CSS element hiding <br />In CSS, there ar...
What is margin-top collapse Margin-top collapse i...
In the previous article https://www.jb51.net/arti...
MySQL replace and replace into are both frequentl...
Table of contents 1. Component Registration 1.1 G...
Problem: The MySQL database crashed unexpectedly ...
[Solution 1: padding implementation] principle: I...
A simple example of how to use the three methods ...