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.

Comments

  • I blog frequently annd I truly thank you for your information.
    The articcle has really peaked my interest. I will take a not off your ste and keep chcking for new details about once per week.
    I opted in for your Feed too.

  • Kevin

    You might want to include setting the proper permissions for the relevant folders

    $ chmod o+x ~
    $ chmod o+x ~/public_html
    $ chmod -R o+r ~/public_html

Leave a Comment