/opt/wlp/usr/servers/defaultServer/server.xml
:
...
<keyStore id="defaultKeyStore"
type="JKS" password="{xor}Lz4sLB80OiZmZmY="
pollingRate="5s"
updateTrigger="polled" />
...
<httpEndpoint id="defaultHttpEndpoint"
host="*"
httpPort="-1"
httpsPort="9443" />
/etc/apache2/sites-enabled/000-default-le-ssl.conf
:
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
SSLProxyEngine on
ProxyPreserveHost On
SSLProxyVerify none
SSLProxyCheckPeerCN off
SSLProxyCheckPeerName off
<Proxy *>
Order allow,deny
Allow from all
</Proxy>
ProxyPass / https://localhost:9443/
ProxyPassReverse / https://localhost:9443/
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
SSLCertificateFile /etc/letsencrypt/live/fouad.io/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/fouad.io/privkey.pem
Include /etc/letsencrypt/options-ssl-apache.conf
ServerName api.fouad.io
</VirtualHost>
...
</IfModule>
/etc/apache2/sites-enabled/000-default.conf
:
<VirtualHost *:80>
RewriteEngine on
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
</VirtualHost>