Not Just Paranoid

Another site by Pete Maynard

Quick and diry way to set-up shared web hosting.

I have a web server running lighttpd and I have a few sites I want to run from it. This is what I did to enable “shared” web hosting with separate user login.

Fist create a new user for the domain.

useradd newDomain

Add this user to the www-data group

usermod -a -G www-data newDomain

Create the virtual domain in lightys config.

$HTTP["host"] =~ "(^|\.)newDomain\$" {
        server.document-root = "/var/www/newDomain/"
        server.errorlog = "/var/log/lighttpd/newDomain/error.log"
        accesslog.filename = "/var/log/lighttpd/newDomian/access.log"
        server.error-handler-404 = "/e404.php"

Link the web root to the home directory.

ln -s /var/www/newDomain /home/NewDomain/public_html

And the log files.

ln -s /var/log/lighttpd/newDomain /home/NewDomain/logs

Login as the new user and navigate to public_html, and you good to go.

29 Jan 2012 | Tags ( debian lighttpd Linux shared web hsoting )

Website Last Updated on 15 Sep 2023 (CC BY-SA 4.0)

This site uses JQuery and nanogallery2 hosted by
for the Flickr photo feed and GoatCounter for user insights.