Jump to content


Photo

Help Needed on php-fpm configuration

php-fpm php

  • Please log in to reply
3 replies to this topic

#1 thesmahesh

thesmahesh

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 01 August 2014 - 01:43 PM

Dear All,
 
Operating System: RedHat Linux 7
 
I wanted to configure php for oracle http server.
I followed the instructions given in the below link:
 
 
Based on the above link, i created php.conf file as given below to forward all requests to php-fpm for processing php files:
 
 
LoadModule fastcgi_module "/chroot/home/ec-user/Oracle/Middleware/Oracle_Home/ohs/modules/mod_fastcgi.so"
 
<IfModule mod_fastcgi.c>
 
<VirtualHost *:80>
 
ServerName fpmtest.localhost
DocumentRoot /var/www/html
 
FastCGIExternalServer /var/www/html/php-fpm -host 127.0.0.1:9000
 
    <Directory /var/www/html>
        Order allow,deny
        Allow from all
        <FilesMatch \.php$>
            SetHandler application/x-httpd-fastphp5
        </FilesMatch>
        Action application/x-httpd-fastphp5 /php-fpm
    </Directory>
</VirtualHost>
 
</IfModule>
 
 
 
 
Now php files located within the directory /var/www/html are getting processed fine. But php files located within the subdirectories of /var/www/html are not being processed and are displayed as plain text files.
 
Please help me on what needs to be done so that php files located within all the subdirectories/virtual hosts stored within /var/www/html are also processed.
 
For eg. i have the given below directive for one of my virtual host.
Please let me know what needs to be done to process php files in similar virtual host directives:
 
 
<VirtualHost *:80>
  ServerName mydomain.com
ServerAlias www.mydomain.com    
    
DocumentRoot /var/www/html/mydomain/www/web
 
<Directory /var/www/html/mydomain/www/web>
AllowOverride All
  RewriteEngine On
  Options -Indexes FollowSymLinks
          
</Directory>   
 
</VirtualHost>
 
 
 
 
Also please let me know what needs to be done add php-fpm to start automatically at boot time
 
Please help.
 
Thanks and Regards


#2 trq

trq

    Advanced Member

  • Administrators
  • 31,023 posts
  • LocationSydney, Australia.

Posted 02 August 2014 - 12:22 AM

Never heard of Oracle http server before, the config looks like Apache's Http server.

http://thorpesystems.com | http://proemframework.org | http://github.com/trq

SmtpCatcher - A very simple mock sendmail useful for testing PHP mail scripts.
OPM - My Linux package manager.


#3 thesmahesh

thesmahesh

    Newbie

  • New Members
  • Pip
  • 2 posts

Posted 02 August 2014 - 12:54 AM

Oracle HTTP Server (OHS) is a web server based on the Apache HTTP Server, created by the Oracle Technology Network



#4 jazzman1

jazzman1

    Advanced Member

  • Gurus
  • 2,664 posts
  • LocationMississauga, Canada

Posted 05 August 2014 - 08:25 PM

 

Now php files located within the directory /var/www/html are getting processed fine. But php files located within the subdirectories of /var/www/html are not being processed and are displayed as plain text files.

 

Interesting...what happens if you try to log into a console as apache or OHS user trying to call this php script directly from terminal?

 

 

Also please let me know what needs to be done add php-fpm to start automatically at boot time

 

Use a checkconfig command to activate the service booting it to whatever runlevel(s) you want to be.

 

PS: I will try to install this service onto my redhat server later on.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

Cheap Linux VPS from $5
SSD Storage, 30 day Guarantee
1 TB of BW, 100% Network Uptime

AlphaBit.com