========================================
Configuring a standard or alternate port
========================================


The easiest way to enable clients to access a Repository server on
standard ports is to configure the server to redirect traffic received
on standard HTTP port 80 to the standard Repository HTTP port 8080::

  sudo iptables -t nat -F
  sudo iptables -t nat -A OUTPUT -d localhost -p tcp --dport 80 -j REDIRECT --to-ports 8080
  sudo iptables -t nat -I PREROUTING -p tcp --dport 80 -j REDIRECT --to-port 8080



HTTPS
=====

To use HTTPS, redirect traffic from standard HTTPS port 443 to
standard Repository HTTPS port 8443::

  sudo iptables -t nat -A OUTPUT -d localhost -p tcp --dport 443 -j REDIRECT --to-ports 8443
  sudo iptables -t nat -I PREROUTING -p tcp --dport 443 -j REDIRECT --to-port 8443



NOTE: See also :doc:`enable-https`.


Alternate port
==============

To run Repository on a port other than the standard port
8080:

#. Modify the usual instructions by adjusting the port numbers in
   your :doc:`iptables configuration <adjust-iptables-port80>`.

#. Specify the correct port in your ``supervisord.conf`` file.
