Port Directive

Top - Docs - General - Server - Resource - Access - FAQ - Tutorials

Purpose

The Port directive sets what port HTTPd listens to for clients.


Syntax

Port num

num is a number from 0 - 65536. Most ports below 1024, except port 80, are reserved by the system.

If you want to use a port below 1024 (such as 80, the standard HTTP port), and your ServerType is standalone, you will need to run HTTPd as root when starting it up.

Only one Port directive is allowed in the configuration file.


Virtual Host

The server can only listen to one port, so the Port directive is invalid in virtual host configuration.


Default

If you do not specify a Port, HTTPd assumes:

Port 80

Compile Option: DEFAULT_PORT


Examples

Port 8080

The server would listen to port 8080.

Port 84

The server would try to listen to port 84.


[Back] Return to Server Configuration File Overview
NCSA HTTPd Development Team / httpd@ncsa.uiuc.edu / 10-02-95