• Debian 11 is approaching its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.80 will be the last release to support it.
    If you are running Plesk Obsidian on Debian 11, we recommend you upgrade those servers to Debian 12 using our dist-upgrade tool.
  • We plan to deprecate and remove the support for XML RPC protocol versions earlier than 1.6.9.1 in Plesk Obsidian 18.0.82. We strongly recommend that you update all existing integrations using earlier versions of the XML RPC protocol to comply with the version 1.6.9.1 specification.

Plesk 10.1.1 per-domain PHP settings

MassimoP

Basic Pleskian
Hi,
I need help on how to set PHP settings for specific domain and/or subdomains.

I found tutorials for Plesk 10.3, 10.4 but nothing for Plesk 10.1.1.

Thanks in advance
 
Here is what I read in one of the configuration file:

# ATTENTION!
# DO NOT MODIFY THIS FILE OR ANY PART OF IT. THIS CAN RESULT IN IMPROPER PLESK
# FUNCTIONING OR FAILURE, CAUSE DAMAGE AND LOSS OF DATA. IF YOU REQUIRE CUSTOM
# MODIFICATIONS TO BE APPLIED TO THE CONFIGURATION, PLEASE, PERFORM THEM IN THE
# FOLLOWING FILE(S):
#[PATH]/vhost.conf
#[PATH]/vhost_ssl.conf
#[SUBDOMAIN_PATH]/vhost.conf

It seems it is possible to do what I need (at least by using Apache php_admin_flag, php_admin_value, ecc...)

I don't think I can upgrade to other Plesk versions on my server.
 
I solved the problem by myself.

Follow the steps (Plesk 10.1.1):
1. Modify the file: [PATH]/vhost.conf (or [PATH]/vhost_ssl.conf or [SUBDOMAIN_PATH]/vhost.conf)
2. Reconfigure the domain: /usr/local/psa/admin/sbin/httpdmng --reconfigure-domain [DOMAIN]

[DOMAIN] is always the main domain (even if you are configuring a subdomain)
[PATH] is something like this: /srv/www/vhosts/[DOMAIN]/conf
[SUBDOMAIN_PATH] is like this: /srv/www/vhosts/[DOMAIN]/subdomains/[SUBDOMAIN]/conf

The vhost.conf file has the structure (this example changes only the PHP safe_mode flag):
<Directory /srv/www/vhosts/[DOMAIN]>
php_admin_flag safe_mode on
</Directory>

or if you are changing the configuration of a subdomain:
<Directory /srv/www/vhosts/[DOMAIN]/[SUBDOMAIN]>
php_admin_flag safe_mode on
</Directory>


Hope this could help.
 
Last edited:
Back
Top