Following this tutorial and this followup I have a fresh Nginx + PHP5-FPM setup on Debian 6 (Squeeze) running on an OpenVZ VPS.
Right now the default virtual host works (Welcome to nginx!
is displayed) as well as one other virtual host, on which I was able to successfully install WordPress. However, any further virtual hosts I create simply show Cannot find server
in the title of my browser window and Access to this web page is currently unavailable.
in the page.
Aside from actual domain names and file paths (DNS and file paths are apparently working properly with proper users and permissions) my virtual hosts use the same config. The configs are in /etc/nginx/sites-available/
with links at /etc/nginx/sites-enabled/
. All other config files are copied from the linked blog posts.
The logs have no entries from these hits, so I'm unable to find anything useful there unfortunately.
This config below is used by all of my virtual hosts, including the one that works:
server {
listen 80;
server_name example.com;
access_log /var/www/example.com/logs/access.log;
error_log /var/www/example.com/logs/error.log;
root /var/www/example.com/html/;
include /etc/nginx/wordpress.conf;
location /static {
autoindex on;
}
}
server {
listen 80;
server_name www.example.com;
rewrite ^ http://example.com$request_uri?;
}