• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

vhost.conf from skel dir not copied when creating new domain in plesk 10.4.4

Mshaker

Basic Pleskian
PRODUCT, VERSION, OPERATING SYSTEM, ARCHITECTURE
plesk 10.4.4 CentOS 5 1013111102.18 , CentOS release 5.7 (Final), x64

PROBLEM DESCRIPTION
After upgrading from plesk 10.3 to plesk 10.4.4 the vhost.conf file is not used from the skel directory from /var/www/vhosts/.skel/0/conf when creating a new domain.

STEPS TO REPRODUCE
Create a vhost.conf file in /var/www/vhosts/.skel/0/conf

eg: /var/www/vhosts/.skel/0/conf/vhost.conf
<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/usr/share/pear"
</Directory>

ACTUAL RESULT
After creating the domain the vhost.conf file from the skeleton directory is not copied to the /var/www/vhosts/domain name/conf directory and new new open base dir is not set.

EXPECTED RESULT
Plesk should use the skeleton directory and apply any defaults added their to any new domain created through the control panel.

ANY ADDITIONAL INFORMATION
The domains are created using the plesk 10 API.
 
Mshaker, thank you for your bug report.
We reproduced this problem. Fix will be available in one of the next microupdates for 10.4.4.
 
As possible workaround you can replace file /usr/local/psa/admin/plib/Service/Apache/VhostContent/Skeleton.php with attached.
It should help.
 

Attachments

  • Skeleton.zip
    2.2 KB · Views: 19
no vhost.conf present

@IgorG

I applied the Skeleton.php as suggested but still get NO vhost.conf
I had to manually create it.

This is how the /conf directly looks after applying and running the following command
/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

-rw-r----- 1 root apache 376 Nov 30 20:52 13226791520.38589600_httpd.include
-rw-r----- 1 root apache 7.1K Nov 30 20:52 13226791520.38589600_httpd_ip_default.include
-rw-r----- 1 root apache 376 Nov 30 20:54 13226792580.92021500_httpd.include
-rw-r----- 1 root apache 6.4K Nov 30 20:54 13226792580.92021500_httpd_ip_default.include
-rw-r----- 1 root apache 376 Nov 30 21:30 13226814070.92622100_httpd.include
-rw-r----- 1 root apache 6.4K Nov 30 21:30 13226814070.92622100_httpd_ip_default.include
-rw-r----- 1 root apache 376 Nov 30 23:04 13226870420.66243900_httpd.include
-rw-r----- 1 root apache 6.5K Nov 30 23:04 13226870420.66243900_httpd_ip_default.include
-rw-r----- 1 root apache 376 Dec 1 00:45 13226931220.01302400_httpd.include
-rw-r----- 1 root apache 7.5K Dec 1 00:45 13226931220.01302400_httpd_ip_default.include
-rw-r----- 1 root apache 376 Dec 1 10:34 13227284530.77055000_httpd.include
-rw-r----- 1 root apache 7.5K Dec 1 10:34 13227284530.77055000_httpd_ip_default.include
-rw-r----- 1 root apache 376 Dec 1 10:35 13227285330.35077400_httpd.include
-rw-r----- 1 root apache 7.5K Dec 1 10:35 13227285330.35077400_httpd_ip_default.include
-rw-r----- 1 root apache 376 Dec 1 10:36 13227286020.43347500_httpd.include
-rw-r----- 1 root apache 7.5K Dec 1 10:36 13227286020.43347500_httpd_ip_default.include
-rw-r----- 1 root apache 597 Nov 30 23:50 vhost.conf


PLESK INFO:

10.4.4 Update #4, last updated at Nov 30, 2011
 
-- Update --

After a server reboot I added another domain.
This time the vhost.conf was put into the conf directory.
however the domain name was missing from the path it shows @domain_name@

<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/usr/share/pear"
</Directory>

_httpd.include

when issuing /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

a new _httpd.include is generated every time
 
when issuing /usr/local/psa/admin/sbin/httpdmng --reconfigure-all

a new _httpd.include is generated every time

Yes, this is by desing.
Old files (except last 5 configs) will be removed after execution of daily maintenance script.
 
Yes, this is by desing.
Old files (except last 5 configs) will be removed after execution of daily maintenance script.

Aha - thanks for that info - new to 10.x - still learning the ropes

Any thoughts or suggestions on the vhost.conf with the path showing @domain_name@
 
Not fully fixed yet

Igor it looks like this isn't fully fixed yet. With the patch it will copy the vhost.conf files but it doesn't do the substitution of the @domain_name@ with the real domain name in the files.

eg:

<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/usr/share/pear:/usr/share/php"
</Directory>

Please advise ?
 
Unable to proceed

@kriogen

I tried to apply the update but FAILD with the following error:

Determining the packages that need to be installed.
Error: Unable to proceed with the installation until the package mod_suphp-0.7.1-1.el5.art.x86_64 is removed from the system.
Not all packages were installed.
Please resolve this issue and try installing the packages again.
If you cannot resolve the issue on your own, contact product technical support for assistance.


rpm -qa | grep php

php-pdo-5.3.8-2.el5.art
php-snmp-5.3.8-2.el5.art
php-soap-5.3.8-2.el5.art
php-common-5.3.8-2.el5.art
php-mysql-5.3.8-2.el5.art
php-xml-5.3.8-2.el5.art
php-common-5.3.8-2.el5.art
php-mbstring-5.3.8-2.el5.art
php-devel-5.3.8-2.el5.art
psa-php53-configurator-1.6.2-1.el5.art
php-cli-5.3.8-2.el5.art
mod_suphp-0.7.1-1.el5.art
php-soap-5.3.8-2.el5.art
php-devel-5.3.8-2.el5.art
php-cli-5.3.8-2.el5.art
php-snmp-5.3.8-2.el5.art
php-5.3.8-2.el5.art
php-gd-5.3.8-2.el5.art
php-mbstring-5.3.8-2.el5.art
php-xmlrpc-5.3.8-2.el5.art
php-xml-5.3.8-2.el5.art
php-gd-5.3.8-2.el5.art
php-mysql-5.3.8-2.el5.art
php-bcmath-5.3.8-2.el5.art
php-bcmath-5.3.8-2.el5.art
php-xmlrpc-5.3.8-2.el5.art
 
After quite alot of digging, removing and help from @lvalics - we finally got MU#5 installed.

The vhost.cong file is now present in the /conf directory.
HowEver the substitution of the @domain_name@ is still as before.

<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/usr/share/pear:/usr/share/php"
</Directory>
 
Last edited:
After quite alot of digging, removing and help from @lvalics - we finally got MU#5 installed.

The vhost.cong file is now present in the /conf directory.
Howver the substitution of the @domain_name@ is still as before.

<Directory /var/www/vhosts/@domain_name@/httpdocs>
php_admin_value open_basedir "/var/www/vhosts/@domain_name@/httpdocs:/tmp:/usr/share/pear:/usr/share/php"
</Directory>



We are having this issue as well with 10.4 with all patches applied. The @domain_name@ is also not being replaced in the error_docs templates, and the index.html.
 
I have just installed a fresh copy of PLESK 10.4.4 #5 - CENTOS 6

The @domain_name@ substitution problem remains.

Any suggestions?
 
Some Progress MU#6

I have just installed 10.4.4 MU#6

When creating a new domain - @domain_name@ substitution in the vhost.conf is now working.

However domains with an existing vhost.conf are not updated

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

If I delete the vhost.conf and run --reconfigure-all No vhost.conf is created
 
Last edited:
I have just installed 10.4.4 MU#6

However domains with an existing vhost.conf are not updated

/usr/local/psa/admin/sbin/httpdmng --reconfigure-all

If I delete the vhost.conf and run --reconfigure-all No vhost.conf is created

That's not how this feature worked. The skel config is only used on first domain creation.
 
Back
Top