Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Dear Pleskians! The Plesk Forum will be undergoing scheduled maintenance on Monday, 7th of July, at 9:00 AM UTC. The expected maintenance window is 2 hours.
Thank you in advance for your patience and understanding on the matter.
If you want to add something to the global httpd config, the cleanest way is usually to create a new .conf file in /etc/httpd/conf.d/. All .conf files in that dir are automatically included in the global config and don't get overwritten by upgrades.
Well, apparently Plesk is not really capable of properly using auto_prepend_file.
After all my Plesk headaches this comes as no surprise.
Some more research has however offered several bad suggestions from setting open_basedir to "none" in /etc/php.ini to putting the prepended file in /tmp.
I'm running Plesk 8.1. Plesk defines the open_basedir restriction on a per-domain basis (at least mine does) in vhost.conf. All of my domains have vhost.conf, and each of them are restricted by it.
Overriding the restrictions via httpd.include will, so far as I know, override ALL of the vhost.conf settings - domain-specific settings that I want to keep. If I'm wrong about this please end my suffering and let me know how it is done.
It seems you've got it all backwards. By default Plesk only generates a conf/httpd.include file for domain. This is a file you should never edit (like it says in the comments at the top of those files).
If you want to override or add any settings for a domain you create a conf/vhost.conf file (and run websrvmng to have it add an include in the httpd.include file). In this way you can change a domain's open_basedir path. The SWsoft knowledge base even has an article on this very topic: http://kb.swsoft.com/article_41_432_en.html
I do not want to open_basedir for a single domain, which I would do with vhost.conf. I want to open_basedir for ALL existing domains, without creating a new vhost.conf for each of them.
The problem with this is that when a new domain is created, the conf/httpd.include file that is created with it contains the following basedir directive:
1) append to the order in which the .include files are processed (i don't know where this is done but it isn't in httpd.conf)
or
2) regenerate all the domains after modifying the skeleton? I believe that when you migrate, the new server applies its skeleton to the old files. Not sure about this though.
Ok, so you were talking about httpd.conf (global) instead of httpd.include (domain specific)...
No, there is no single file you can edit to override the open_basedir path for all domains. You'll have to create a vhost.conf file for every domain (you may want to script that if there's a lot of domains). For new domains you can put a prepared vhost.conf in the skeleton with the open_basedir path override already there.
I have now found that I will also have to turn off safe mode for all those sites in order to include the file I want to prepend.
This sucks.
All I am trying to do is auto_prepend a file to all my domains, so I can automatically include some small library files that I have created. This should be easier then having to add a vhost.conf and turning safe mode off on every domain.
Not to mention the fact that I just migrated to a new server from 7.5.4->8.1 and even though all the vhost.conf files were copied, the paths were not adjusted for the domain root so all my old files are:
<Directory /home/httpd/vhosts/domain.com>
but my new domain directory is actually
/var/www/vhosts/domain.com
Therefore none of the vhost.conf's work.
Thanks SWSoft for making my life a living hell over the past month.
First off, thanks for all your help - many of your posts on this forum and on the ART forum have really helped me out lately.
So...do you mean like this?
[root@109839-app1 httpd]# pwd
/home/httpd
[root@109839-app1 httpd]# ls -la
total 12
drwxr-xr-x 2 root root 4096 Mar 12 18:37 .
drwxr-xr-x 6 root root 4096 Mar 12 18:37 ..
lrwxrwxrwx 1 root root 16 Mar 12 18:37 vhosts -> /var/www/vhosts/
That doesn't work for me. It ignores all entire Directory directives in vhost.conf indicating that it probably doesn't think /home/httpd/vhosts/domain.com/httpdocs exists.
When I change Directory to /var/www/vhosts/domain.com/httpdocs it immediately works.