• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

conf, skel, and subdomains

A

ArchStanton

Guest
How to create a vhost.conf file in the skel directory for subdomains?

I'm creating a bunch of subdomains that I would like to be able to include php files from the parent domain. Of course open_basedir restriction is a problem. I am going to try using the skeletons to add a conf directory with a vhost.conf file to overcome this problem. Will the skel files work with the subdomains?

Does the @domain_name@ refer to the parent domain, or the subdomain? How would I create a conf file that would accomplish the following:

Code:
<Directory  /home/httpd/vhosts/domain.com/subdomains/sub_name/httpdocs>

        php_admin_value open_basedir "/home/httpd/vhosts/domain.com/httpdocs:/home/httpd/vhosts/domain.com/subdomains/sub_name/httpdocs:/tmp"

</Directory>

The following obviously would not work, but does anyone know something similar to this that would?

Code:
<Directory  /home/httpd/vhosts/@domain_name@/subdomains/@sub_domain_name@/httpdocs>

        php_admin_value open_basedir "/home/httpd/vhosts/@domain_name@/httpdocs:/home/httpd/vhosts/@domain_name@/subdomains/@sub_domain_name@/httpdocs:/tmp"

</Directory>
 
Another thought. Somewhere is the template or script used to create the httpd.include files for each domain. Is there any way to edit these?
 
Does anyone even have a clue if I'm on the right track?
 
Did you find and answer to this question yet? I am interested in exactly how I can use the skel directory. I thought I read somewhere that the conf directory would be removed automatically for security reasons but someone would have to confirm this for this to be a legitimate comment ;)
 
Originally posted by Charles Coleman
Did you find and answer to this question yet? I am interested in exactly how I can use the skel directory. I thought I read somewhere that the conf directory would be removed automatically for security reasons but someone would have to confirm this for this to be a legitimate comment ;)

Never got an answer from anyone on this. I eventually gave up.

My solution, which may or may not help anyone, much like this forum, was this: instead of trying to include the files from another directory, I used PHP's FTP functions to transfer the files from the server to itself. The owners of the site can run the script whenever they create a new sub-domain. I also have the script create symbolit links to files that don't need to be executed, like images and css.

If you think this might be helpful to you, I can dig up some example code.
 
Hey, check out this thread thread... I'm sure you already know about this but you may not have thought of doing it quite this way.
 
Back
Top