EduardoV5 wrote:
Go it working! It was just a matter of adding the index.php to the location index, not just the location ~ \.php$ fastcgi_index.
That is needed for most cases since fastcgi_index and index are not the same thing. fastcgi_index is specific to cgi wrappers such as fcgi or php-fpm, where index is global to the entire vhost.
EduardoV5 wrote:
Thanks for your time and help.
Now, is that error while attempting a fast cgi restart to be expected ?
The "spawn-fcgi: bind failed: Address already in use" error.
You shouldn't be seeing that error, however I've seen many people report issues with using php directly through fcgi (instead of php-fpm. Far fewer problems seem arise from using php-fpm, so it may be worth switching, if only just to try it and see if it works. Just make sure fcgi isn't running when you start php-fpm.
Quick tip: This isn't really necessary, but it's generally good to keep the index directive
outside location blocks. This way, if you decide to place subdirectories in your vhost's root which also contain one of the index options you specify, nginx will automatically use it when visiting the subdirectory.
Better yet, if all your vhosts will use the same index line, place it in your nginx.conf instead, in the http section.