Forum

Getting 403 or file download at php file requests

RoestVrijStaal
18 January 2013, 01:25
Hello,

I'm having troubles with plugging PHP in Hiawatha.

I get 403 errors when accessing a simple test php file

When checking the error.log, only these entries are found:
(my ip)(timestamp)|/var/www/test.php|CGI execution not allowed
( and so on )


I tried it with PHP-fpm, but after setting it up via dotdeb.org (because the package wasn't in Debian's Repository), but I get the same results.

My configuration file is here: http://roestvrijstaal.pastebay.net/1175004
==================================================================

the www.conf file of php-fpm is here: http://roestvrijstaal.pastebay.net/1175005

Hiawatha version: v8.7
PHP version: PHP 5.3.3-7+squeeze14 with Suhosin-Patch (cgi-fcgi) (built: Aug 6 2012 20:09:06)
Zend Engine v2.3.0, with Suhosin v0.9.32.1
Operating System: Debian 6.0 Squeeze

I would like some help of what's going wrong

Best Regards,

RoestVrijStaal
Hugo Leisink
18 January 2013, 10:29
Adding 'ExecuteCGI = yes' to your DEFAULT HOST section should do the trick. You are now using normal CGI, which is a lot slower than FastCGI. My advice is to read the 'CGI and FastCGI' HOWTO to switch to FastCGI.
RoestVrijStaal
19 January 2013, 03:41
Thanks for your input.

FastCGI was what I aimed for, but yesterday I thought that the config entries are required to use FastCGI as well, but it seems it doesn't.

Also since my aim was to have 1 web on 1 webserver, I found VirtualHost unnecessary for the moment, but it turns out it's needed to make use of FastCGI.
Again, thanks for the help. Hiawatha is running smooth here

A small thing to add to the how-to maybe: that php-fpm works now with so-called 'pools of fpm-processes' for each website/environment. So instead of putting the configuration entries for php-fpm in php-fpm.conf, create a new or edit the current (= www.conf ) conf-file at /etc/php5/fpm/pool.d/ directory.

Could be the spam control thing of this forum be a bit more mild? I have to change it a dozen of times to post it.
This topic has been closed.