Lighttpd

From DreamHost

Jump to: navigation, search

Contents

About Lighttpd

Lighttpd is a secure, fast, compliant, and very flexible web-server that has been optimized for high-performance environments. It has a very low memory footprint compared to other webservers and takes care of cpu-load. Its advanced feature-set (FastCGI, CGI, Auth, Output-Compression, URL-Rewriting and many more) make lighttpd the perfect webserver-software for every server that suffers load problems.

DreamHost Lighttpd Version

Currently, Dreamhost's Lighttpd version option is only available to DreamHost PS customers. You can enable it through the Configure Server page in the panel.

Known Issues

Dreamhost's Lighttpd version is currently in beta, and as Lighttpd and Apache are entirely different HTTP servers, they are not 100% compatible. Currently, there are known issues with:

  • WebDAV
  • URL Rewriting
  • .htaccess files (including WebDAV, url re-writing, and password protection!)
  • Subversion
  • One-click Installs
  • Remap Sub-Dir

This means that websites with existing Apache configuration files can break and this option should be used with extreme caution!

Lighttpd Server-Per-User Customization

Dreamhost's Lighttpd version is currently set up so each user has their own Lighttpd server and can customize the configuration. If you have Lighttpd enabled, you should see a directory in your home directory called 'lighttpd' with configuration files for all of your domains. Your server's name is the same as your username.

Stopping, Starting, and Restarting Lighttpd

As each user has their own lighttpd server, they are also allowed to stop, start, and restart it.

This can be accomplished from SSH with the following commands:

sudo /etc/init.d/lighttpd stop <user>
sudo /etc/init.d/lighttpd start <user>
sudo /etc/init.d/lighttpd restart <user>

Error Log Location

Error logs seem to be located in /usr/local/dh/lighttpd/logs/username, rather than the log directory.

URL Rewriting

Note that the Dreamhost lighttpd.conf file for your server (located at /usr/local/dh/lighttpd/servers/username/lighttpd.conf) already has rewriting rules listed in it. Thus, to have URL rewrite rules on your domain, you should add them to the url rewrite rule as follows:

url.rewrite-once += ( "^/foo/([^/]*)" => "/bar/$1" )

Note the plus.

External Links

Personal tools