Current location - Quotes Website - Team slogan - Set web server port command
Set web server port command
First, log in to the server with root or another account with administrative rights. Then, use the text editor of the server operating system to open the /etc/services file and add the required port number and service name to it. Next, use the netstat -an | grep port number command to confirm whether the port you set is available. If the port number is available, you can use it to start the web server. Finally, use iptables-a input-ptcp-mtcp-dport port number -j ACCEPT command to allow external access to your server.