• Debian 11 has reached its end-of-life (vendor EOL date - August 31, 2026). Plesk Obsidian 18.0.81 is 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.

Modifying default Apache settings

Unicron

New Pleskian
Hi,

I'm trying to modify Odin so that newly created sites will have the following extra Apache settings:

Code:
<Directory /var/www/<sitename>/httpdocs/wp-content/plugins>
        Options +FollowSymlinks -SymLinksIfOwnerMatch
</Directory>

However even after reading the documentation, I have no idea where or how to make this change.

So far I've copied 'domainVirtualHost.php' to "/usr/local/psa/admin/conf/templates/custom/domain". Is this the right file? How would I go about making the changes required?

Background information:

This is for one of our clients who have a custom WordPress plugin that they develop and use on their sites. The plugin is located in "/home/user/plugin", which is then symlinked to the directory described above in each site.

We've been able to add the symlink using the .skel structure and the PHP settings using the Plesk interface, so that all new sites are created with the correct PHP settings and symlink location. But the allowing Symlinks bit is giving us a bit of bother :)
 
The documentation is pretty straight forward (http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=68693.htm)

So far you're on the right path. You just need to edit that copied version of domainVirtualHost.php to include what you want to include. I am not 100% familiar with PHP (sadly) so can't tell you how to go about changing it but http://download1.parallels.com/Ples...nistration-guide/index.htm?fileName=68798.htm talks about how the templates are executed.

Once you're done editing the template, you'll just issue php -l domainVirtualHost.php to make sure there was no errors. Once ensured there's no issues with the custom script, you'll be able to issue httpdmng --reconfigure-server to reconfigure it server wide (so the server will start using that) and if you want all existing domains to start using it now you'll just issue httpdmng --reconfigure-all

Hopefully another person can help with the PHP code to match what you're trying to add but that's pretty much the basics (if I made any sense...)
 
Hey thanks a lot for your help. I'd gotten that far, but I'm also far too unfamiliar with PHP to understand the syntax or variable names used. So I'm also hoping someone else can help with that last piece of the puzzle as it were.
 
Back
Top