Welcome Guest, Not a member yet? Register   Sign In
Implementing apache fpm has broken my app
#1

Hi Team,
I was reviewing my server config and decided to try and implement php fpm/fastcgi in anticipation of lots of concurrent sessions.
Software: apache 2.4.41 (ubuntu); php 7.4; CI 3.1.16
Now when I try to launch my site on a browser (I use FF 94 on ubuntu), I can see
- -  12/Nov/2021:09:52:52 +0000 "POST /index.php" 303

- -  12/Nov/2021:09:52:52 +0000 "GET /index.php" 200
in the fpm pool log, but nothing happens, ie my home page is not displayed.
I have done a bit of research and found a couple of articles suggesting that url rewriting was "tricky" and I may need to change .htaccess in my root directory.
Currently it is (as suggested above ):
Options -Indexes +FollowSymLinks

RewriteEngine On
#RewriteBase /

# exclude any paths that are not codeigniter-app related
RewriteCond %{REQUEST_URI} !^/server-status
RewriteCond %{REQUEST_URI} !^/server-info
RewriteCond %{REQUEST_URI} !^/docs

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

<IfModule mod_php5.c>
    RewriteRule ^(.*)$ index.php/$1 [L]   
</IfModule>   

# the following is for rewritting under FastCGI
<IfModule !mod_php5.c>   
    RewriteRule ^(.*)$ index.php?/$1 [L]

Sadly I am still no further and it isn't working.
I am hoping I have missed something obvious? Can anyone help? Clearly I can revert to mpm_prefork and mod_php7.4 but I really want to try
and take advantage of the quicker and less memory hungry mpm_event and php-fpm if possible.

Thx Paul
Reply
#2

I had a similar problem that I fixed by adding a ? to the rewrite rule. I see you also did that but you have an if statements for mod_php5 module. Maybe there's something wrong with the condition?
CodeIgniter 4 tutorials (EN/FR) - https://includebeer.com
/*** NO support in private message - Use the forum! ***/
Reply




Theme © iAndrew 2016 - Forum software by © MyBB