Super User is a question and answer site for computer enthusiasts and power users. 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 want the urls to be http://serverip/user_1/somefile.html but right now it only serves files from the "www" folder

any help will be appreciated.

Thank you

share|improve this question
While the symlink will work if the user permissions are correct, you may want to look into user dirs as well – ernie Jun 20 '13 at 18:42

If you want users to be able to access http://serverip/user_1/somefile.html

Then you would do this

ln -s /home/user_1 /var/www

Note that you still have to have proper read permissions set for apache to read the files in /home/user_1

You can also accomplish this in apache configs, take a look here

share|improve this answer
or just ln -s /home/user_1 /var/www (without the cd). This also assumes the permissions are correct. – ernie Jun 20 '13 at 18:39
mmhm, changed it – wonton Jun 20 '13 at 18:41
thanks, sorry for my lack of knowledge with this topic, if i were to add another file, will i have to do 'ln -s newfile.html' again? – Joseph Jun 20 '13 at 18:55
no it references the directory and reflects the directory's present state, not the state it was at when linked – wonton Jun 20 '13 at 18:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .