< Home

http server port

Function

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.

Format

http [ ipv6 ] server port port-number

undo http [ ipv6 ] server port

Parameters

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.

Views

System view

Default Level

3: Management level

Usage Guidelines

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.

Example

# Set the listening port number of the HTTP IPv4 server to 1025.

<HUAWEI> system-view
[HUAWEI] http server port 1025

# Set the listening port number of the HTTP IPv6 server to 1500.

<HUAWEI> system-view
[HUAWEI] http ipv6 server port 1500
Copyright © Huawei Technologies Co., Ltd.
Copyright © Huawei Technologies Co., Ltd.
< Previous topic Next topic >