Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pb-seo-friendly-images domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the johannes domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /var/www/html/pcx3.com/wp-includes/functions.php on line 6121
Add custom Apache rules in cPanel - PC✗3
Add custom Apache rules in cPanel

Add custom Apache rules in cPanel

You can customize Apache (2.4) virtual hosts with Include Files, by creating new include.conf file for that user or for all vhosts on your server.

💡 In the following code snippets make sure to replace:

  • <user> with the cpanel account’s username
  • <domain> with the domain name
  • <include.conf> with desired filename, or leave as include.conf

Scheme for an individual virtual host

SSL:

/etc/apache2/conf.d/userdata/ssl/2_4/<user>/<domain>/include.conf

Non-SSL:

/etc/apache2/conf.d/userdata/std/2_4/<user>/<domain>/include.conf

Scheme for all virtual hosts

SSL:

etc/apache2/conf.d/userdata/ssl/2_4/include.conf

Non-SSL

/etc/apache2/conf.d/userdata/std/2_4/include.conf

Scheme for all virtual hosts that the user owns

SSL:

/etc/apache2/conf.d/userdata/ssl/2_4/<user>/include.conf

Non-SSL:

/etc/apache2/conf.d/userdata/std/2_4/<user>/include.conf

After creating new or editing existing include userdata file, you must rebuild the httpd.conf file and restart Apache for the changes to take effect:

Rebuild httpd.conf:

scripts/rebuildhttpdconf

Restart Apache:

scripts/restartsrv_httpd
whoami
Stefan Pejcic
Join the discussion

I enjoy constructive responses and professional comments to my posts, and invite anyone to comment or link to my site.