PHP Fast CGI Apache 2#

  • Install components
yum install mod_fcgid
  • Rename php.conf to disable mod_php
mv /etc/httpd/conf.d/php.conf /etc/httpd/conf.d/php.conf.notused

  • Uncomment cgi.fix_pathinfo = 1 in php.ini
vi /etc/php.ini

  • Create wrapper script and set permissions
mkdir -p /var/www/php-fcgi-scripts/web
vi /var/www/php-fcgi-scripts/web/php-fcgi-starter

#!/bin/sh
PHPRC=/etc/
export PHPRC
export PHP_FCGI_MAX_REQUESTS=5000
export PHP_FCGI_CHILDREN=8
exec /usr/bin/php-cgi

chmod -R 755 /var/www/php-fcgi-scripts/web
chown -R $user:apache /var/www/php-fcgi-scripts/web
  • Add virtual hosts

vi /etc/httpd/conf/httpd.conf
or
vi /etc/httpd/conf.d/vhost.conf

 <IfModule mod_fcgid.c>
    SuexecUserGroup web1 web1
    PHP_Fix_Pathinfo_Enable 1
    <Directory /var/www/web1/web/>
      Options +ExecCGI
      AllowOverride All
      AddHandler fcgid-script .php
      FCGIWrapper /var/www/php-fcgi-scripts/web1/php-fcgi-starter .php
      Order allow,deny
      Allow from all
    </Directory>
  </IfModule>


  • Test in browser

Add new attachment

Only authorized users are allowed to upload new attachments.
« This page (revision-3) was last changed on 24-May-2017 15:30 by Hyve Support
G’day (anonymous guest) My Prefs
  • View Page Source
  • This clear IPSec security association,
    clear ipsec sa peer X.X.X.X
    

All Pages

Page views: 2016

Private Tomcat

Linux

MySQL

Email

SQL Server

ASP

JSP

C#

Web Mail

Windows Plesk

Linux Plesk

PHP

Gaming

ASP.NET

Persits ASPUpload

Wiki Help

Referring Pages:
...nobody

JSPWiki v2.8.1