Can't get .user.ini to work or custom PHP-FPM pool configuration for domain

OBJECTIVE
I am trying to get open_basedir to have access from one domain (api) public_html folder to another domain(cdn) public_html folder, both under the same user.

REASON
I am getting the error “include(): open_basedir restriction in effect.”

I have checked other documentation and tried to use:

  1. .user.ini in my domain root folder. open_basedir = "/home/chr/web/api.domain.com/public_html:/home/chr/web/cdn.domain.com/public_html:/home/chr"
  2. Tried to use web templates according to this document Web Templates and FastCGI/Proxy Cache | Hestia Control Panel (hestiacp.com)
    I created a new file patch.api.domain.com.conf in my /etc/php/8.2/fpm/pool.d/ directory.
    The document highlights that upon updates or site rebuild, the default configuration will be overwritten, so i need to create a custom .conf file.
    I might have done something wrong but i also don’t understand this part of the documentation.
    “When you are done editing your template, enable it for the desired domain from the control panel.”

QUERIES:

  • How do i enable it?
  • Is there an easier way to get this done?
  • Have i made a mistake?

Follow the instructions exactly and it should work:

How can I change settings for a specific domain

With the switch to PHP-FPM there are currently 2 different ways:

2. Via the PHP-FPM pool config. 

Config templates for the PHP pool can be found in `/usr/local/hestia/data/templates/web/php-fpm/`.

Create in /usr/local/hestia/data/templates/web/php-fpm/ a new file with name YOURNAME-PHP-8_1.tpl

And make in that file the changes

1 Like

I have created a file patch.domain.com.conf in /usr/local/hestia/data/templates/web/php-fpm/. I log on to the web panel and navigate to the domain, i tried to change Backend Template PHP-FPM and select patch from the list.
When i click Save, i get “Error: patch backend template doesn’t exist”.

That doesn’t;t work it need to be:

WARNING

Due to the fact we use multi PHP we need to recognise the PHP version to be used. Therefore we use the following naming scheme: YOURNAME-PHP-X_Y.tpl, where X_Y is your PHP version.

For example a PHP 8.1 template would be YOURNAME-PHP-8_1.tpl.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.