domain.com/~user/ website setup – Lighttpd

If you want to enable the users on your linux box have their own home page, where you can access from domain.com/~user, its pretty simple!

  1. Edit /etc/lighttpd/lighttpd.conf

Under server.modules add: “mod_userdir”

In the main body of the file, add userdir.path = “public_html”.

2. Add the “public_html” folder.

In your account root, (cd ~). run mkdir “public_html”

3. Insert a test index.html file.

cd public_html to get into the directory.

sudo nano index.html to create the index file.

<html><body><h1>Done!</h1></body></html> the html to add to the file. Save and close the file.

4. Restart lighttpd.

sudo /etc/init.d/lighttpd restart

Done! If this didnt work for you leave me a comment and I will see if I can help.