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