How to make an SSL proxy on Apache server?

Ok, i found a solution to make strapi ssl enabled ( apache2 ) :slight_smile:

first, have theses modules enabled :

sudo a2enmod ssl
sudo a2enmod proxy
sudo a2enmod proxy_balancer
sudo a2enmod proxy_http

and this is the tip :

in /etc/apache2/sites-available/strapi.mysite.fr-le-ssl.conf : 
<VirtualHost strapi.mysite.fr:443>
    ServerName strapi.mysite.fr
 ServerAlias strapi.mysite.fr
        
                ProxyPreserveHost On
                ProxyPass / http://strapi.mysite.fr:1337/
                ProxyPassReverse / http://strapi.mysite.fr:1337/
        
         SSLProxyEngine On

<Proxy *>
    Order allow,deny
    Allow from all
</Proxy>

Include /etc/letsencrypt/options-ssl-apache.conf
SSLCertificateFile /etc/letsencrypt/live/strapi.mysite.fr/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/strapi.mysite.fr/privkey.pem
</VirtualHost>
</IfModule>

and you can see > https://strapi.mysite.fr/ is redirected from http://strapi.mysite.fr:1337 and works .

enjoy

1 Like