0

Can anyone help me on how to change the default location of localhost in ubuntu 14.10 having apache server.

I have a created folder "/media/lomas/development/www". Now i want to place all my web projects inside this directory. and i want to access them from browser like "localhost/project-name". can anyone help me on this? thanks.

user3698996
  • 1
  • 1
  • 2

1 Answers1

1

Open your :

/etc/apache2/sites-enabled/000-default

Find "DocumentRoot" and update the default path with your new custom path where you want to access your project directly.

Save the file and restart your apache.

Mihir Bhende
  • 8,677
  • 1
  • 30
  • 37
  • Thanks for your reply but It is showing error ------------------------- Forbidden You don't have permission to access / on this server. – user3698996 Jan 28 '15 at 16:57
  • I think the folder you have changed the localhost root to, has root permissions. You need to change the user to your user to be able to access it. Go to your terminal and type "whoami" you will get the user which you are currently in. – Mihir Bhende Jan 28 '15 at 17:06
  • If issue still persists, you need to do configurations mentioned in this link : http://stackoverflow.com/questions/21551840/forbidden-you-dont-have-permission-to-access-on-this-server – Mihir Bhende Jan 28 '15 at 17:07