File: //etc/apache2/sites-enabled/010-textpony-dev.2amigos.us-le-ssl.conf
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName textpony-dev.2amigos.us
DocumentRoot /var/www/vhosts/textpony-dev.2amigos.us/docroot/
<Directory /var/www/vhosts/textpony-dev.2amigos.us/docroot>
Options FollowSymLinks
AllowOverride All
Allow from 107.20.185.102
Allow from 138.201.82.136
Allow from 3.209.222.142
Satisfy any
AuthType Basic
AuthBasicProvider file
AuthUserFile /var/www/vhosts/.htpasswd
AuthName secure
Require valid-user
</Directory>
Alias /pmadm /var/www/pmadm/
<Directory "/var/www/pmadm">
AllowOverride None
Options None
Order allow,deny
Allow from 107.20.185.102
Allow from 138.201.82.136
<IfModule setenvif_module>
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
</IfModule>
<FilesMatch ".+\.ph(ar|p|tml)$">
SetHandler "proxy:unix:/run/php/pmadm.sock|fcgi://pmadm"
</FilesMatch>
<FilesMatch ".+\.phps$">
Require all denied
</FilesMatch>
<FilesMatch "^\.ph(ar|p|ps|tml)$">
Require all denied
</FilesMatch>
</Directory>
#websocket
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteRule /(.*) ws://localhost:14200/$1 [P]
ProxyPass /pmadm !
ProxyPass / http://127.0.0.1:14200/
ProxyPassReverse / http://127.0.0.1:14200/
ProxyRequests Off
RedirectMatch 404 /\.git
ErrorLog ${APACHE_LOG_DIR}/textpony-dev.2amigos.us-error_log
CustomLog ${APACHE_LOG_DIR}/textpony-dev.2amigos.us-access_log common
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/textpony-dev.2amigos.us/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/textpony-dev.2amigos.us/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName api.textpony-dev.2amigos.us
DocumentRoot /var/www/vhosts/textpony-dev.2amigos.us/docroot/
<Directory /var/www/vhosts/textpony-dev.2amigos.us/docroot>
Options FollowSymLinks
AllowOverride All
Allow from 107.20.185.102
Allow from 138.201.82.136
Allow from 3.209.222.142
Satisfy any
AuthType Basic
AuthBasicProvider file
AuthUserFile /var/www/vhosts/.htpasswd
AuthName secure
Require valid-user
</Directory>
ProxyPass / http://127.0.0.1:14201/
ProxyPassReverse / http://127.0.0.1:14201/
ProxyRequests Off
RedirectMatch 404 /\.git
ErrorLog ${APACHE_LOG_DIR}/api.textpony-dev.2amigos.us-error_log
CustomLog ${APACHE_LOG_DIR}/api.textpony-dev.2amigos.us-access_log common
Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/textpony-dev.2amigos.us/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/textpony-dev.2amigos.us/privkey.pem
</VirtualHost>
</IfModule>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName panel.textpony-dev.2amigos.us
DocumentRoot /var/www/vhosts/textpony-dev.2amigos.us/docroot/
<Directory /var/www/vhosts/textpony-dev.2amigos.us/docroot>
Options FollowSymLinks
AllowOverride All
Allow from 107.20.185.102
Allow from 138.201.82.136
Allow from 3.209.222.142
Satisfy any
AuthType Basic
AuthBasicProvider file
AuthUserFile /var/www/vhosts/.htpasswd
AuthName secure
Require valid-user
</Directory>
ProxyPass / http://127.0.0.1:18080/
ProxyPassReverse / http://127.0.0.1:18080/
ProxyRequests Off
RedirectMatch 404 /\.git
ErrorLog ${APACHE_LOG_DIR}/panel.textpony-dev.2amigos.us-error_log
CustomLog ${APACHE_LOG_DIR}/panel.textpony-dev.2amigos.us-access_log common
SSLCertificateFile /etc/letsencrypt/live/textpony-dev.2amigos.us/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/textpony-dev.2amigos.us/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
</VirtualHost>
</IfModule>