Nginx configuration problem on VPS


I’m a long time Apache user, but with a new VPS account at DreamHost I thought I would give Nginx a try. However, I can’t get it to serve a simple web page.

In the DreamHost console I’ve configured my domain and tied it to the user account I want to serve the web pages, also in the console I’ve configured my server and enabled nginx (and confirmed it’s running on my VPS using ‘ps -ax’), and following instructions in the wiki to creat the /home/username/nginx/ directory with a simple index.html file. However, nginx refuses to serve anything except the error file from: /dh/web/missing/index.html

[Updated] I guess I’m missing configuration files at that location. I’m looking through the nginx documentation now. It would be helpful if the Wiki was updated to include a very simple config file for static content.



For static content, no additional nginx configuration file should be necessary. Nginx works off the same basic configuration system as the default Apache setup does — you still add domains through the panel and (typically) serve them from directories like /home/username/ The /nginx/ directory is usually only needed for special tasks (like URL rewriting), similar to those that would require an .htaccess under Apache.