I have a basic php cgi configuration problem on top of the apache web server in Ubuntu 10.04 . I am trying to setup cgi so as to answer one of the urls localhost/cgi-bin/index.php
or localhost/index.php
with the output from the execution of /usr/lib/cgi-bin/index.php
which currently has as output phpinfo()
.
I followed Ubuntu 10.04 > Ubuntu Server Guide > Web Servers > HTTPD - Apache2 Web Server to get me started and have the virtual host stuff done . I also created the php script and tried to access it but I have the force redirect problem . I tried to fix it by enabling mod_actions and doing what the page says about the Action and AddHandler directives. I inserted the 2 directives in httpd.conf
but I get accesses to /var/www
in the error log:
Action php-script /cgi-bin/php # (or /cgi-bin , /cgi-bin/ for my setup)
AddHandler php-script .php
So now I am stuck and I could use some help.