Hi,
I'm new to Nginx and have limited knowledge about web servers, but have read up on it and have been trying to install Freepbx on a home server on my pogoplug. I had Freepbx up and running with Nginx and php5 and fastcgi with Debian Squeeze, but had various problems with Freepbx and other things so I upgraded to Wheezy. In my setup I have the document root located in /var/www and can access Freepbx's welcome page with the links to voicemail flash operator and administration panel, but when I click on any one of those links I get no input file specified.
Here is my sites-available configuration
server {
listen 80; ## listen for ipv4
listen [::]:80 default ipv6only=on; ## listen for ipv6
server_name _;
access_log /var/log/nginx/localhost.access.log;
root /var/www;
index index.php index.html index.htm;
location / {
}
location /doc {
root /usr/share;
autoindex on;
allow 127.0.0.1;
deny all;
}
location /images {
root /usr/share;
autoindex on;
}
#error_page 404 /404.html;
# redirect server error pages to the static page /50x.html
#
#error_page 500 502 503 504 /50x.html;
#location = /50x.html {
# root /var/www/nginx-default;
#}
# proxy the PHP scripts to Apache listening on 127.0.0.1:80
#
#location ~ \.php$ {
#proxy_pass http://127.0.0.1;
#}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
#
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files, if Apache's document root
# concurs with nginx's one
#
location ~ /\.ht {
deny all;
}
}
and here are the permissions
root@debian:/var/www# ls -la
total 48
drwxr-xr-x 7 asterisk asterisk 4096 Apr 9 08:35 .
drwxr-xr-x 12 root root 4096 Apr 9 05:11 ..
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 _asterisk
drwxr-x--- 11 asterisk asterisk 4096 Apr 9 08:35 admin
drwxr-xr-x 2 asterisk asterisk 4096 Apr 9 06:38 html
-rw-r--r-- 1 asterisk asterisk 602 Apr 9 08:35 index.html
-rw-r--r-- 1 www-data www-data 19 Apr 9 04:18 info.php
-rw-r--r-- 1 asterisk asterisk 4542 Apr 9 08:35 mainstyle.css
drwxr-x--- 6 asterisk asterisk 4096 Apr 9 08:35 panel
drwxr-x--- 7 asterisk asterisk 4096 Apr 9 08:35 recordings
-rw-r--r-- 1 asterisk asterisk 361 Apr 9 08:35 robots.txt
root@debian:/var/www#
root@debian:/var/www# cd /var/www/admin
root@debian:/var/www/admin# ls -la
total 152
drwxr-x--- 11 asterisk asterisk 4096 Apr 9 08:35 .
drwxr-xr-x 7 asterisk asterisk 4096 Apr 9 08:35 ..
drwxr-x--- 5 asterisk asterisk 4096 Apr 9 08:34 assets
-rw-r--r-- 1 asterisk asterisk 8682 Apr 9 08:34 bootstrap.php
drwxr-x--- 6 asterisk asterisk 4096 Apr 9 08:34 cdr
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 common
-rw-r--r-- 1 asterisk asterisk 11226 Apr 9 08:34 config.php
-rw-r--r-- 1 asterisk asterisk 17540 Apr 9 08:34 functions.inc.php
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 helpers
drwxr-x--- 15 asterisk asterisk 4096 Apr 9 08:34 i18n
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:34 images
-rw-r--r-- 1 asterisk asterisk 41 Apr 9 08:34 index.php
drwxr-x--- 3 asterisk asterisk 4096 Apr 9 08:34 libraries
-rw-r--r-- 1 asterisk asterisk 470 Apr 9 08:34 module-builtin.xml
drwxr-x--- 14 asterisk asterisk 4096 Apr 9 08:35 modules
-rw-r--r-- 1 asterisk asterisk 45724 Apr 9 08:35 page.modules.php
-rw-r--r-- 1 asterisk asterisk 1188 Apr 9 08:35 panel.php
-rw-r--r-- 1 asterisk asterisk 2242 Apr 9 08:35 reports.php
drwxr-x--- 2 asterisk asterisk 4096 Apr 9 08:35 views
The reason i gave permissions ro asterisk is because I have Nginx running as user and group asterisk as needed by Freepbx. (On a side note, is it possible to run it as www-data for other vhosts?)
Thanks