The http server port command sets the listening port number of the HTTP server.
The undo http server port command restores the default listening port number of the HTTP server.
By default, the listening port number of the HTTP server is 80.
Parameter | Description | Value |
---|---|---|
ipv6 | Specifies a listening port number for an HTTP IPv6 server. If this parameter is not specified, the command configures a listening port number for an HTTP IPv4 server. |
- |
port-number | Specifies the listening port number of the HTTP server. | The value is 80, or an integer that ranges from 1025 to 55535. The default value is 80. |
Usage Scenario
By default, the listening port number of the security HTTP server is 80. Attackers may frequently access the default listening port, which wastes bandwidth, deteriorates server performance, and prevents authorized users from accessing the HTTP server through the listening port. You can run the http server port command to specify another listening port number to prevent attackers from accessing the listening port.
Precautions
If the http server port command is configured several times, only the latest configuration takes effect.