Expand my Community achievements bar.

Nomination window for the Adobe Community Advisor Program, Class of 2025, is now open!
SOLVED

¿How to configure to enable https protocol in docker dispatcher locally?

Avatar

Level 2

Hello everyone.

I am trying to enable https protocol in my local docker installation of dispatcher.

I have created the certificates and installed it in the src/conf.d/ssl folder.
In the mysite.vhost file I have configured the following.

SSLEngine on
SSLCertificateFile “../ssl/server.crt”
SSLCertificateKeyFile “../ssl/server.key”.

I get this error back:
ERROR Tue Jan 28 10:52:13 UTC 2025 Configuration invalid, please fix and retry,
Line numbers reported are correct for your configuration file


I found this article https://experienceleague.adobe.com/en/docs/experience-manager-dispatcher/using/configuring/dispatche...
But I see that it refers to the connection of dispatcher to CQ and vice versa.

Has anyone successfully configured local docker dispatcher with https?
Can you tell me the configuration steps.
Thanks

 

1 Accepted Solution

Avatar

Correct answer by
Level 6

To enable HTTPS on your local Docker Dispatcher setup, follow these steps:
1. Ensure SSL Modules Are Installed: Make sure the mod_ssl Apache module is enabled in your Docker image. If it's not, add these lines to your Dockerfile:

 

RUN apt-get update && apt-get install -y apache2 ssl-cert
RUN a2enmod ssl

 

2. Modify mysite.vhost for SSL: Update your mysite.vhost configuration file with absolute paths:

 

 

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /path/to/ssl/server.crt
    SSLCertificateKeyFile /path/to/ssl/server.key
    SSLCertificateChainFile /path/to/ssl/chain.pem  # if needed

    ServerName mysite.local
    DocumentRoot /var/www/html
</VirtualHost>

Listen 443

 

3. Fix Validator Error: The error indicates that the configuration is being rejected due to unallowed directives. This might be due to Docker environment restrictions. If you're working locally, you can bypass this check and manually restart Apache in the container.
4. Test HTTPS: After updating the configuration, restart the Apache server in your Docker container and access the Dispatcher over https://localhost:443.
5. Ensure Correct File Paths: Double-check that the paths to your SSL certificate files (server.crt, server.key) are correct within the container’s file system. These steps should get HTTPS working for your local Docker Dispatcher.

View solution in original post

5 Replies

Avatar

Community Advisor

Hi @jorganer ,

Please check below documents for enabling https protocol.

https://experiencing150.rssing.com/chan-25971229/article476.html

Additionally, you can also checkout below blogs for dispatcher setup with docker.

https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/setting-up-a-local-aem-dis...

https://github.com/adobe/aem-dispatcher-docker

Regards,  

Shiv Prakash

Avatar

Level 2

Thank you very much for the answer.

I am trying point one of your answer.

The problem I am having is that the validator pops up

INFO Wed Jan 29 12:51:11 UTC 2025: Start testing
Cloud manager validator 2.0.62
2025/01/29 12:51:11 Apache configuration uses non-allowlisted directives:
2025/01/29 12:51:11 conf.d/available_vhosts/001_mysite.vhost:8: SSLCertificateFile
2025/01/29 12:51:11 conf.d/available_vhosts/001_mysite.vhost:9: SSLCertificateKeyFile
2025/01/29 12:51:11 conf.d/available_vhosts/001_mysite.vhost:6: SSLEngine
2025/01/29 12:51:11 conf.d/available_vhosts/001_mysite.vhost:7: SSLProtocol

ERROR Wed Jan 29 12:51:11 UTC 2025 Configuration invalid, please fix and retry,
Line numbers reported are correct for your configuration files.

 

Is there any way not to run this validation?

Best regards

Avatar

Level 6

1. Disable Validation: You can’t bypass the validation in Cloud Manager, as it’s required for deployments.
2. Allowed Configurations: You need to configure SSL with the allowed directives for Cloud Manager. Consult Adobe support for custom SSL configurations.

Avatar

Correct answer by
Level 6

To enable HTTPS on your local Docker Dispatcher setup, follow these steps:
1. Ensure SSL Modules Are Installed: Make sure the mod_ssl Apache module is enabled in your Docker image. If it's not, add these lines to your Dockerfile:

 

RUN apt-get update && apt-get install -y apache2 ssl-cert
RUN a2enmod ssl

 

2. Modify mysite.vhost for SSL: Update your mysite.vhost configuration file with absolute paths:

 

 

<VirtualHost *:443>
    SSLEngine on
    SSLCertificateFile /path/to/ssl/server.crt
    SSLCertificateKeyFile /path/to/ssl/server.key
    SSLCertificateChainFile /path/to/ssl/chain.pem  # if needed

    ServerName mysite.local
    DocumentRoot /var/www/html
</VirtualHost>

Listen 443

 

3. Fix Validator Error: The error indicates that the configuration is being rejected due to unallowed directives. This might be due to Docker environment restrictions. If you're working locally, you can bypass this check and manually restart Apache in the container.
4. Test HTTPS: After updating the configuration, restart the Apache server in your Docker container and access the Dispatcher over https://localhost:443.
5. Ensure Correct File Paths: Double-check that the paths to your SSL certificate files (server.crt, server.key) are correct within the container’s file system. These steps should get HTTPS working for your local Docker Dispatcher.

Avatar

Level 2

Hi

It would be nice if in future versions of the sdk, they could think of an easier way to activate in dispatcher the https in local.

Best regards.