Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

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

is there any way by which i can change the port number and localhost name on which apache web server runs in ubuntu ?

share|improve this question

migrated from May 18 '10 at 4:17

This question came from our site for professional and enthusiast programmers.

Please set some useful tags. "help" isn't very detailed nor helpful in categorizing your question... – joschi May 18 '10 at 5:46

Yes. Check out Listen parameter in httpd.conf configuration file.

share|improve this answer

Edit the file:


or the files in:


share|improve this answer

go to /etc/apache2/sites-enabled/

<VirtualHost *:[whateverport]>
     ServerAlias [whatever]

and add the listen to in the /etc/apache2/ports.conf

share|improve this answer

Your Answer


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