davidjames829
New member
- Joined
- Jul 8, 2025
- Messages
- 1
Hi Community,
I’m looking for insights on the best practices for configuring custom PHP settings for specific domains in DirectAdmin, as I’ve noticed inconsistent application in some setups. I’d love to hear how others manage this for their hosting environments.
Details:
Questions:
I’d appreciate any community insights or recommended approaches to streamline this process! Thanks in advance.
Cheers,
David James
I’m looking for insights on the best practices for configuring custom PHP settings for specific domains in DirectAdmin, as I’ve noticed inconsistent application in some setups. I’d love to hear how others manage this for their hosting environments.
Details:
- Setup: DirectAdmin (latest version as of July 2025, Evolution skin), CentOS 7, CustomBuild 2.0, PHP 8.1 (php-fpm mode), hosting multiple client domains.
- Context: I’m using Admin > Custom HTTPD Configurations to set custom PHP directives (e.g., upload_max_filesize=50M, post_max_size=50M) for a specific domain via the php-fpm81 configuration. The settings are added in the |CUSTOM| token for the domain’s virtual host.
- Observation: The custom PHP settings sometimes don’t apply consistently across domains, especially after CustomBuild updates or server restarts. I’ve checked the PHP Info page for the domain, and default settings (e.g., upload_max_filesize=2M) occasionally persist.
- Steps Taken:
- Added customizations via Admin > Custom HTTPD Configurations, saved, and restarted httpd/php-fpm.
- Verified syntax in /usr/local/directadmin/data/users/<user>/php/php-fpm81.conf.
- Reviewed DirectAdmin’s Custom HTTPD guide (https://docs.directadmin.com/webservices/apache/custom-httpd.html).
- Ensured no conflicting settings in /usr/local/directadmin/custombuild/configure/fpm/conf/php-fpm.conf.81.
- Goal: Understand reliable methods to ensure custom PHP settings apply consistently per domain without being overridden.
Questions:
- What are your go-to methods for managing per-domain PHP settings in DirectAdmin (e.g., Custom HTTPD vs. custom php.ini)?
- Are there best practices to prevent CustomBuild updates from resetting custom PHP configurations?
- Any tips for validating that custom PHP settings are applied correctly (e.g., specific logs or CLI commands)?
- How do you handle multi-PHP setups (e.g., PHP 7.4 and 8.1) to avoid conflicts in custom settings?
I’d appreciate any community insights or recommended approaches to streamline this process! Thanks in advance.
Cheers,
David James