简体   繁体   中英

How to migrate from ubuntu/apache2 to httpd docker image?

So far I used the ubuntu/apache2:2.4-22.04_beta to run a apache2 reverse proxy.

I added ssl certs to /etc/apache2/ssl , and site configuration to /etc/apache2/sites-available/000-default.conf .

With configuration like:

<VirtualHost *:443>
        SSLEngine On
        SSLCertificateFile ...
        SSLCertificateKeyFile ...
        SSLProtocol all -SSLv3 -TLSv1 -TLSv1.1
        SSLCipherSuite  ...

        ProxyRequests Off
        ProxyPreserveHost On

        <Location /my-api>
                ProxyPass ...
                ProxyPassReverse ...
                RequestHeader set X-Forwarded-Prefix ...
        </Location>
</VirtualHost>

Question: I now would like to switch to https://hub.docker.com/_/httpd/ But how would I have to migrate those settings? Is the image exchangeable while keeping all configurations?

The key concept was to migrate all a2enmod to LoadModule statements, into httpd.conf . The VirtualHost config could be migrated 1:1. That's it.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM