Hi, On 31 July 2015 at 07:55, youradds <nginx-fo...@nginx.us> wrote:
> Hi, > > I've already got a live + dev site running under nginx and perl (with > fcgi), > but I can't for the life of me work out why its not working this time > around. I've setup a new dev server. I wont bore you with all of the > details, but suffice to say I have installed (via apt-get); > > sudo apt-get update && sudo apt-get upgrade > sudo apt-get install nginx > sudo apt-get install php5-cli php5-cgi spawn-fcgi php-pear > sudo apt-get install mysql-server php5-mysql > sudo apt-get install fcgiwrap > > The OS is Debian 8.1. > > I have then configured my site, using: > > server { > > listen 80; > > server_name site.net.net www.site.net.net; > access_log /srv/www/site.net.net/logs/access.log; > error_log /srv/www/site.net.net/logs/error.log; > root /srv/www/site.net.net/www; > > location / { > index index.html index.htm; > } > > location ~ \.php$ { > try_files $uri =404; > include /etc/nginx/fastcgi_params; > fastcgi_pass 127.0.0.1:9000; > fastcgi_index index.php; > fastcgi_param SCRIPT_FILENAME > /srv/www/site.net.net/www$fastcgi_script_name; > } > > location ~ \.cgi$ { > try_files $uri =404; > gzip off; > include /etc/nginx/fastcgi_params; > fastcgi_pass unix:/var/run/fcgiwrap.socket; > fastcgi_index index.cgi; > fastcgi_param SCRIPT_FILENAME > /srv/www/site.net.net/www/cgi-bin/$fastcgi_script_name; > } > AFAIK, path before $fastcgi_script_name should not end with / Log didn't say anything in particular? error 403 where comes? 403 means forbidden, perhaps socket which your are running has not been started with same permissions as Nginx does/can. Running fcgi manually through that socket could bring you more clues about whats happening/wrong with the communication between Nginx and fcgi > } > > I've sym-linked the config files into sites-enabled, so that its visible on > nginx. I then rebooted nginx, and tried: > > index.html - works fine > index.php - works fine > index.cgi - 403 error > > I managed to fumble my way through it last time, but I can't figure out > what > I did different (I know it was a real pig to get configured the first time > around) > > Any suggestions from the experts? > > (appologies for the formatting of this post - can't figure out how to do > markup?) > > TIA > > Andy > > Posted at Nginx Forum: > http://forum.nginx.org/read.php?2,260678,260678#msg-260678 > > _______________________________________________ > nginx mailing list > nginx@nginx.org > http://mailman.nginx.org/mailman/listinfo/nginx > -- ~ Happy install ! Erick. --- IRC : zerick Blog : http://zerick.me About : http://about.me/zerick Linux User ID : 549567
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx