Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to change apache port to 82 (to confugure nginx): I changed:

  • NameVirtualHost to NameVirtualHost in apache2.conf

  • Listen to Listen in ports.conf

  • VirtualHost to VirtualHost in sites-available/default

And changed manually ports in every virtualhost. But when I create new host, it creates with 80 default port, and in the prev. config file are added lines with port 80. How can I change the default port?

share|improve this question
up vote 1 down vote accepted

You can change the default port for newly created virtual hosts via:

System Settings -> Server Templates -> Default Settings -> Apache website -> Port number for virtual hosts.

(Taken from Virtualmin support request at (requires registration))

share|improve this answer
Oh, of course, I missed this parameter. Thank you! – user59178 May 28 '11 at 10:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.