• Introducing WebPros Cloud - a fully managed infrastructure platform purpose-built to simplify the deployment of WebPros products !  WebPros Cloud enables you to easily deliver WebPros solutions — without the complexity of managing the infrastructure.
    Join the pilot program today!
  • Support for BIND DNS has been removed from Plesk for Windows due to security and maintenance risks.
    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.

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