eva2000
Verified User
- Joined
- Jul 1, 2019
- Messages
- 122
DirectAdmin noob adding his first domain setup via DirectAdmin User control panel
Background
And resulting vhost below see it's using the main hostname's SSL certs ?
Background
- Directadmin was installed with hostname configured as hostname.domain.com with letsencrypt SSL cert setup as outlined here. Specifically
Code:
cd /usr/local/directadmin/scripts dahostname=hostname.yourdomain.com ./letsencrypt.sh request_single $dahostname 4096
- New domain added was a subdomain name as subdomain1.domain.com via User level access via Account Manager > Domain Setup with SSL checkbox enabled.
- The new subdomain1.domain.com ends up using the Letsencrypt SSL certificate issued to the hostname.domain.com and not as subdomain1.domain.com ? Am I meant to also manually run
Code:
cd /usr/local/directadmin/scripts vhostname=subdomain1.yourdomain.com ./letsencrypt.sh request_single $vhostname 2048
Code:egrep 'enable_ssl_sni=|letsencrypt=' /usr/local/directadmin/conf/directadmin.conf letsencrypt=1
And resulting vhost below see it's using the main hostname's SSL certs ?
Code:
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /etc/httpd/conf/ssl.crt/server.ca
ServerName www.subdomain.domain.com
Code:
# Auto generated apache config file by DirectAdmin version 1.57.5
# Modifying this file is not recommended as any changes you make will be
# overwritten when the user makes any changes to their website
# For global config changes that affect all Users, see this guide:
# http://help.directadmin.com/item.php?id=2
# For local config changes that only affect one User, see this guide:
# http://help.directadmin.com/item.php?id=3
<Directory "/home/admin/public_html">
<FilesMatch "\.(inc|php|phtml|phps|php73)$">
AddHandler "proxy:unix:/usr/local/php73/sockets/admin.sock|fcgi://localhost" .inc .php .phtml .php73
</FilesMatch>
<IfModule mod_fcgid.c>
SuexecUserGroup admin admin
</IfModule>
</Directory>
<VirtualHost SERVERIP:80 >
ServerName www.subdomain.domain.com
ServerAlias www.subdomain.domain.com subdomain.domain.com
ServerAdmin [email protected]
DocumentRoot /home/admin/domains/subdomain.domain.com/public_html
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup admin admin
</IfModule>
CustomLog /var/log/httpd/domains/subdomain.domain.com.bytes bytes
CustomLog /var/log/httpd/domains/subdomain.domain.com.log combined
ErrorLog /var/log/httpd/domains/subdomain.domain.com.error.log
<Directory /home/admin/domains/subdomain.domain.com/public_html>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI -Includes +IncludesNOEXEC
<FilesMatch "\.(inc|php|phtml|phps|php73)$">
<If "-f %{REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy:unix:/usr/local/php73/sockets/admin.sock|fcgi://localhost" .inc .php .phtml .php73
</If>
</FilesMatch>
</Directory>
</VirtualHost>
<VirtualHost SERVERIP:443 >
SSLEngine on
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCACertificateFile /etc/httpd/conf/ssl.crt/server.ca
ServerName www.subdomain.domain.com
ServerAlias www.subdomain.domain.com subdomain.domain.com
ServerAdmin [email protected]
DocumentRoot /home/admin/domains/subdomain.domain.com/private_html
UseCanonicalName OFF
<IfModule !mod_ruid2.c>
SuexecUserGroup admin admin
</IfModule>
CustomLog /var/log/httpd/domains/subdomain.domain.com.bytes bytes
CustomLog /var/log/httpd/domains/subdomain.domain.com.log combined
ErrorLog /var/log/httpd/domains/subdomain.domain.com.error.log
<Directory /home/admin/domains/subdomain.domain.com/private_html>
AllowOverride AuthConfig FileInfo Indexes Limit Options=Indexes,IncludesNOEXEC,MultiViews,SymLinksIfOwnerMatch,FollowSymLinks,None
Options -ExecCGI -Includes +IncludesNOEXEC
<FilesMatch "\.(inc|php|phtml|phps|php73)$">
<If "-f %{REQUEST_FILENAME}">
#ProxyErrorOverride on
AddHandler "proxy:unix:/usr/local/php73/sockets/admin.sock|fcgi://localhost" .inc .php .phtml .php73
</If>
</FilesMatch>
</Directory>
</VirtualHost>