I'm setting up Nginx with PHP 5.3 for multiple websites running wordpress for example. I just added a new site and it's being redirected to the default welcome page. I can't see any 'real' errors in the logs.
Here's my abbreviated nginx.conf :
http {
access_log /var/log/nginx_access.log;
index index.php index.html;
server {
listen 80 default_server;
server_name _;
root /opt/nginx/html;
location / {
}
}
server {
listen 80;
server_name example.com *.example.com;
rewrite ^ $scheme://www.example.com$request_uri? permanent;
}
server {
listen 80;
server_name www.example.com;
root /home/example/example.com;
location / {
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php5-fpm/example.sock;
fastcgi_index index.php;
include fastcgi_params;
}
}