• 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!
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.
  • 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.

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