Alternative Web Servers
Two alternative web servers are currently available on DreamHost PS other than Apache: Lighttpd and Nginx. This article lists some of the ways in which these web servers differ from Apache.
Feature comparison
| Feature | Apache | Lighttpd | nginx | Notes |
|---|---|---|---|---|
| Speed | Slow | Fast | Fast | Lighttpd and nginx are significantly faster than Apache, with nginx serving small files up to eight times faster! |
| Memory Use | Heavier | Lighter | Lighter | Lighttpd and nginx often use much less memory than Apache. |
| HTML, etc. | Yes | Yes | Yes | Lighttpd and nginx excel at serving static content such as HTML. |
| CGI | Yes | No | No | FastCGI scripts can be used on Lighttpd and nginx, but only with some custom configuration. |
| PHP | Yes | Yes | Yes | With some caveats. See #PHP (below) for details. |
| Passenger | Yes | No | Yes | nginx runs Passenger-based sites quite well — it's an ideal choice for a Rails or Django site. |
| .htaccess | Yes | No | No | However, some customization is still possible - see Lighttpd and nginx for details. mod_rewrite rules will need to be (manually) converted to function. |
| Subversion repositories | Yes | No | No | Repositories will remain intact under other web servers, but cannot be accessed over HTTP(S). |
| WebDAV | Yes | No | No |
PHP
PHP scripts will run on all three web servers - but only as FastCGI. (CGI and mod_php are not available on other web servers.) However, some environment variables may be set slightly differently depending on the web server, causing some scripts to behave incorrectly.
Additionally, Lighttpd and Nginx start all PHP worker processes at startup — one for each user on the PS with PHP scripts. If you have many users on your PS, this may consume a significant quantity of RAM.
If you do not need PHP for any of the web sites on your PS, you may disable it at Configure Server. This will save you a significant chunk of memory (20–30 MB per user).