Ask Ubuntu is a question and answer site for Ubuntu users and developers. 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

I'm trying to rename my apache2 localhost folder.

I have already gone to /etc/apache2/sites-enabled/site-name and changed the following lines in the Document:

DocumentRoot /home/user/public_html
Directory /home/user/public_html

'public_html' is then the new name of my localhost.

Then i restarted the apache2 server, but this does not work as when i type 'localhost' in my browser i just get an empty screen.

What else must I do to change the folder name of my localhost?

My system is an L-Ubuntu 11.04, by the way.

share|improve this question
Do you have the right settings related to mod_rewrite (only if you have the module enabled of coures). – OrangeTux Feb 8 '13 at 10:14

Try to add correct port in /etc/apache2/ports.conf

share|improve this answer
up vote 0 down vote accepted

The loaded configuration file is at:

There the 'auto_prepend' file needs to be changed.

share|improve this answer

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.