Created
June 25, 2021 12:09
-
-
Save amanjuman/f3e2614e7a12966a9dbcb0a1eb0aca08 to your computer and use it in GitHub Desktop.
PHPMyadmin Apache2 Subdomain Config
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VirtualHost *:80> | |
ServerAdmin [email protected] | |
ServerName sql.domain.tld | |
DocumentRoot /usr/share/phpmyadmin | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =sql.domain.tld | |
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | |
</VirtualHost> | |
<IfModule mod_ssl.c> | |
<VirtualHost *:443> | |
ServerAdmin [email protected] | |
ServerName sql.domain.tld | |
DocumentRoot /usr/share/phpmyadmin | |
SSLCertificateFile /etc/letsencrypt/live/sql.domain.tld/fullchain.pem | |
SSLCertificateKeyFile /etc/letsencrypt/live/sql.domain.tld/privkey.pem | |
Include /etc/letsencrypt/options-ssl-apache.conf | |
ErrorLog ${APACHE_LOG_DIR}/sql.domain.tld-error.log | |
CustomLog ${APACHE_LOG_DIR}/sql.domain.tld-access.log combined | |
</VirtualHost> | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment