LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-18-2015, 01:25 PM   #1
vforv
LQ Newbie
 
Registered: Oct 2014
Posts: 23

Rep: Reputation: Disabled
How to make php-fpm run just php scripts


I have problem with php-fpm it run every file also direcotry index not working...

here is how my virtula host look loke:

Code:
    <VirtualHost *:80>
       
        ServerName example   
        ServerAlias example.com                                                                                                                                                                                                                                                   $
        ServerAdmin example@example.com
        DocumentRoot "/home/example/public_html"
        ErrorLog "/home/example/logs"
        CustomLog "/home/example/logs1.log" combined
        ScriptAlias /cgi-bin/ /home/example/cgi-bin/
        Alias /phpmyadmin /home/phpmyadmin
    
        <IfModule mod_fastcgi.c>    
        <FilesMatch \.php$>
        AddHandler php-fastcgi .php
        Action php-fastcgi /etc/httpd/php/sbin/php-fpm.fcgi
        SetHandler php-script
        </FilesMatch>
        FastCgiExternalServer /home/example/public_html -host 127.0.0.1:9002
        Alias /etc/httpd/php/sbin/php-fpm.fcgi /etc/httpd/php/sbin/php-fpm
        DirectoryIndex index.php index.shtml index.cgi index.html index.htm
        Options +Indexes +FollowSymLinks +ExecCGI +Includes +MultiViews
       </IfModule>
    
         <Directory "/home/example/public_html">
          AllowOverride All  
          Order allow,deny
          Allow from all   
          DirectoryIndex index.php index.html index.htm default.htm
         </Directory>
    
       <Directory "/home/phpmyadmin">
          AllowOverride All  
          Order allow,deny
          Allow from all
          DirectoryIndex index.php index.html index.htm default.htm
          Options -Indexes
       </Directory>
    
    </VirtualHost>
and here is php-fpm pool:

Code:
  ; OUR CUSTOM SETTINGS
    listen = 127.0.0.1:9002
    ;prefix = /home/example
    ;chroot = $prefix
    ; DEFAULT DEBIAN SETTINGS
    ;chdir = /public_html
    user = example
    group = example
    listen.owner = example
    listen.group = example
    pm = dynamic
    pm.max_children = 5
    pm.start_servers = 2
    pm.min_spare_servers = 1
    pm.max_spare_servers = 3
    security.limit_extensions = .php .php3 .php4 .php5
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Installing Lighttpd with PHP (PHP-FPM mode) and MySQL or MariaDB on Ubuntu 15.04 LXer Syndicated Linux News 0 09-29-2015 07:15 PM
LXer: How to install PHP 7 (PHP-FPM & FastCGI) for ISPConfig 3 on Debian 8 (Jessie) LXer Syndicated Linux News 0 07-16-2015 03:11 PM
LXer: Using Multiple PHP Versions (PHP-FPM & FastCGI) With ISPConfig 3 (Ubuntu 12.04) LXer Syndicated Linux News 0 03-10-2013 08:40 AM
LXer: Installing Nginx With PHP 5.3 And PHP-FPM On Ubuntu Lucid Lynx (10.04) LXer Syndicated Linux News 0 06-14-2010 11:42 PM
LXer: Installing PHP 5.3, Nginx And PHP-fpm On Ubuntu/Debian LXer Syndicated Linux News 0 02-10-2010 05:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 01:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration