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

Custom configuration (vhost.conf) problems

G

gsoper

Guest
Hi,
I have a domain (domain.com) with a subdomain (mail.domain.com). The http version of the mail subdomain is fine but I wanted to have an installation of Squirrelmail running at https://mail.domain.com .

I can achieve this with the following code in /var/www/vhosts/cdwhite.org/conf/httpd.include which works perfectly. However this isn't robust as every time something is changed in the domain's configuration the httpd.include file is obviously regenerated, effectively removing the part corresponding to https://mail.domain.com.

Code:
<IfModule mod_ssl.c>

	<VirtualHost 212.241.195.198:443>
		ServerName   mail.domain.com:443
		UseCanonicalName Off
		DocumentRoot /var/www/vhosts/another_domain.com/squirrelmail/current
		CustomLog  /var/www/vhosts/domain.com/statistics/logs/access_ssl_log plesklog
		ErrorLog     /var/www/vhosts/domain.com/statistics/logs/error_ssl_log
		SSLEngine on
		SSLVerifyClient none
		SSLCertificateFile /usr/local/psa/var/certificates/certir10775
		<Directory /var/www/vhosts/another_domain.com/squirrelmail/current>
			<IfModule sapi_apache2.c>
				php_admin_flag engine on
				php_admin_value open_basedir "/var/www/vhosts/another_domain.com/squirrelmail:/tmp"
			</IfModule>
			<IfModule mod_php5.c>
				php_admin_flag engine on
				php_admin_value open_basedir "/var/www/vhosts/another_domain.com/squirrelmail:/tmp"
			</IfModule>
			SSLRequireSSL
			Options -Includes -ExecCGI
		</Directory>
	</VirtualHost>

</IfModule>

At the top of the httpd.include file there's a section warning not to edit the file and instead to create files
/var/www/vhosts/domain.com/conf/vhost.conf
/var/www/vhosts/domain.com/conf/vhost_ssl.conf
/var/www/vhosts/domain.com/subdomains/mail/conf/vhost.conf

I've tried putting the section of code in these files but it has no effect after restarting Apache.

Can someone suggest what I might be doing wrong or might otherwise be wrong? I'm reasonably confident in the code above as it works perfectly when inserted into httpd.include .

This is with Plesk 7.5.4 running on Linux with WebFusion in the UK.
 
Back
Top