Configures HTTP or HTTPS service on a device.
Global configuration mode
Use the http server command with the use-vrf parameter to enable HTTP or HTTPS service and associate it with the specified VRF. The use-vrf parameter configures HTTP or HTTPS service for the specified VRF only. Service for that VRF is enabled or disabled with no effect on service for other VRFs.
Use the http server command with the use-vrf and shutdown parameters to disable HTTP or HTTPS service for the specified VRF.
Use the no http server command with the use-vrf parameter to disable HTTP or HTTPS service and remove its association with the specified VRF. You can disable service for any VRF, including the management VRF. Disabling service for the management VRF is allowed, but removing the server's association with the management VRF is not allowed.
HTTPS crypto certificates are required to enable HTTPS mode. HTTPS crypto certificates determine whether the service is HTTP or HTTPS.
The following example creates and enables HTTP or HTTPS service on a device and specifies using a user-defined VRF (myvrf).
device# configure terminal device(config)# http server use-vrf myvrf
The following example disables HTTP or HTTPS service (or both HTTP and HTTPS services when both are enabled) on a device for a user-defined VRF.
device# configure terminal device(config)# http server use-vrf myvrf shutdown
The following example enables HTTP or HTTPS service on an device for a user-defined VRF when service is disabled.
device# configure terminal device(config)# no http server use-vrf myvrf shutdown
The following example disables HTTP or HTTPS service on a device for a user-defined VRF and removes its association with that VRF.
device# configure terminal device(config)# no http server use-vrf myvrf