sourcecode

Showing posts with label PHP. Show all posts
Showing posts with label PHP. Show all posts

Thursday, June 28, 2012

Apache2 Configuration on Fedora Server for PHP

Get the install path of PHP(/usr/bin/php):
$>whereis php
and the path for php-cgi(/usr/bin/php-cgi):
$>whereis php-cgi

Edit the configuration file for apache2:
$>sudo vi /etc/httpd/conf/httpd.conf
insert the lines to accordance postions:
ScriptAlias /local-bin/ /usr/bin/

AddType applicatoin/x-httpd-php5 .php

AddHandler application/x-httpd-php5 php

Action application/x-httpd-php5 /local-bin/php-cgi

        Order allow,deny
        Allow from all
Finally reload apache:
$>sudo /usr/sbin/apachectrl restart
 /************END*****************/