4

I have a new installation of Ubuntu 12.04 and I want to have 2 or more users be able to test with apache/php/mysql.

Within default config at sites-available I added two different VirtualHosts, one for each user lets say : /home/user1/public_html and /home/user2/public_html

Now I can view the index.php from the user1 at localhost/index.php but I can't do the same for user2. I know there must be a way but I dont know how to google search for it.

Any ideas or maybe point me to the correct direction?

PS: guess the title isn't accurate but I could't think any better

2

First, revert the changes you made at sites-available.

Enable userdir module: sudo a2enmod userdir, and restart apache: sudo service apache2 restart.

Now you can access the files in /home/<username>/public_html through http://1.2.3.4/~<username>/.

For example:

  • http://your.host.name/~user1
  • http://your.host.name/~user2

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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