Submitted by roshanbudhathoki on Sun, 07/09/2017 - 07:25
I recently updated Virtualmin 5.99 and it is good that it supports PHP-FPM out of the box. I have created some domains say 10-15 domains which is working fine. But now when I setup new domain it does not automatically add PHP-FPM pool for the server and I need to manually add pool and configure apache virtualServer.
Is it bug or is done so knowngly?
Status:
Active
Comments
Submitted by JamieCameron on Sun, 07/09/2017 - 10:51 Comment #1
Did you change the default PHP execution mode for new domains to FPM? This can be done at System Settings -> Server Templates -> Default Settings -> Apache website.
Submitted by roshanbudhathoki on Sun, 07/09/2017 - 22:34 Comment #2
Yeap it had been enabled and is still selected at PHP-FPM. And it was working well, the bug occurred only after updating to 5.99 version.
Submitted by gnilebein on Mon, 07/10/2017 - 03:38 Comment #3
I have a similar issue... Can you Switch from fcgi to fpm for existing domains? Currently I can not switch...
Submitted by JamieCameron on Mon, 07/10/2017 - 23:12 Comment #4
roshanbudhathoki - can you select FPM mode for new domains, or is that not even an option?
This will let me determine if the problem is that FPM support isnt even detected, or if it's a problem with new domain setup.
Submitted by roshanbudhathoki on Tue, 07/11/2017 - 01:23 Comment #5
I see this when I go to website options https://ibb.co/dGOSEa
And this is in my virtualmin templates part : https://ibb.co/dGOSEa
Also, what if we could create pool in this format
[example.com.np]
user = example
group = example
listen = 8062
pm = dynamic
pm.max_children = 20
pm.start_servers = 1
pm.min_spare_servers = 1
pm.max_spare_servers = 5
php_admin_value[upload_tmp_dir] = /home/example/tmp
php_admin_value[session.save_path] = /home/example/tmp
pm.max_requests = 50
And the filename be named as 8062-example.com.conf (should be more easier to identify site in performance (process info).
Thanks,
Submitted by JamieCameron on Wed, 07/12/2017 - 01:19 Comment #6
Ok, that should work .. and on my test systems, when I create a template that has FPM mode selected as the default it does get used for new domains.
Are you using Nginx or Apache there as your webserver?
Submitted by roshanbudhathoki on Wed, 07/12/2017 - 01:24 Comment #7
I am using apache as my webserver. It was working fine Jamie but as I got updated to virtualmin5.99 it stopped and I am currently creating pool by myself. The apache proxypass config is correct and create localhost:port entry in the virtualhost config but it does not create relevant .conf file in the pool.d folder for php.
Also, out of 100s of .conf files its harder to filter and find out which one is related to which domain or subdomain as their name is confusing.
Submitted by JamieCameron on Wed, 07/12/2017 - 01:27 Comment #8
Can you post the output that you get when creating the domain? I'd like to see if there are any error messages, and what it reports about FPM.
The numeric pool file names aren't likely to change, as they are based on the domains' unique constant numeric IDs which means the pool files never need to be renamed by Virtualmin.
Submitted by roshanbudhathoki on Wed, 07/12/2017 - 01:42 Comment #9
Nope, it does not show any error or anything at all. Every step is either done or successful and at last restart services are also successful.
Submitted by JamieCameron on Wed, 07/12/2017 - 11:24 Comment #10
Does it say "Restarting FPM server" at the end of the process?
Submitted by roshanbudhathoki on Wed, 07/12/2017 - 11:37 Comment #11
It says and even when I do restart php process using service command such as
service php7.0-fpm restart
it yet does not execute the php code.
Submitted by JamieCameron on Fri, 07/14/2017 - 00:43 Comment #12
When you say it doesn't execute PHP code, what error message are you getting exactly?
Submitted by roshanbudhathoki on Fri, 07/14/2017 - 02:32 Comment #13
This is message I get it. * Also, the server credentials I gave has both of the PHP-FPM and LetsEncrypt error, you can examine well.
url : hamrochords.com/index.php
Service Unavailable
The server is temporarily unable to service your request due to maintenance downtime or capacity problems. Please try again later.
Apache/2.4.27 (Ubuntu) Server at hamrochords.com Port 80
Submitted by JamieCameron on Fri, 07/14/2017 - 20:36 Comment #14
I think I'd need remote access to your system to figure out what's going on here..
Submitted by roshanbudhathoki on Sat, 07/15/2017 - 01:13 Comment #15
Jamie, I already gave you the remote access to the server. Did you receive an email from developer.roshan@gmail.com
This PHP-FPM issue and LetsEncrypt error
<a href="https://www.virtualmin.com/node/52770">https://www.virtualmin.com/node/52770</a>
is in the same server. I think it helps you with remote access.
Submitted by JamieCameron on Sat, 07/15/2017 - 17:21 Comment #16
Thanks, I am looking into this now on your system.
Submitted by JamieCameron on Sat, 07/15/2017 - 17:41 Comment #17
Ok, I think I've fixed the issue on your system - the problem was that the Apache
mod_fcgid
module needed for FPM mode to work wasn't enabled, but it was still chosen as the default mode. The next Virtualmin release will handle this more gracefully.