• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

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