Last active
December 6, 2018 08:39
-
-
Save asamofal/1a228179ec9316243c9cfc77a67db1f2 to your computer and use it in GitHub Desktop.
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
# remove access via domain.com/phpmyadmin | |
nano /etc/phpmyadmin/apache.conf | |
#Alias /phpmyadmin /usr/share/phpmyadmin | |
# create new virtualhost for subdomain: | |
nano /etc/apache2/sites-available/pma.conf: | |
<VirtualHost *:80> | |
ServerAdmin webmaster@localhost | |
ServerName pma.demo-itmaster.com | |
ServerAlias pma.demo-itmaster.com | |
DocumentRoot /usr/share/phpmyadmin | |
<Directory /usr/share/phpmyadmin> | |
Require all granted | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
RewriteEngine on | |
RewriteCond %{SERVER_NAME} =pma.demo-itmaster.com | |
RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent] | |
</VirtualHost> | |
# install lets encrypt ssl certs | |
certbot --apache | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment