Hi,
If I try to run php applications located in web root (/var/www) they just won't work-they either get 404 page or mainly 'no input file' error. I tried to get phplist working, but it would be the same for any app placed in /var/www.
My default vhost is:
server {
server_name 192.168.0.150;
location / {
root /var/www;
}
#php
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/tmp/php.socket;
include fastcgi_params;
}
#status and stats
location /nginx_status {
stub_status on;
access_log off;
allow 192.168.0.0/16;
deny all;
}
# redirect server error pages to the static page /50x.html
#
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
}
This works for sites I have setup via dyndns: the vhosts I put to together from the info on the nginx wiki for a drupal and wordpress site work, however- if I try to set the default server_name to localhost or use anything but the server ip address, all the sites stop working due to dns.
How do I setup a php application in /var/www so that nginx can find it? I cant use the server ip again, it's already been used in the default vhost? How would I set things up if I wanted 3 or 4 php applications like phplist in /var/www? If phplist is in /var/www/phplist on the server (192.168.0.150) what vhost do I use?
As you can tell, I'm a bit stumped after a few hours of messing around-this should have been easy but I can't see where I'm going wrong.
Thanks for any help.