¿How to configure to enable https protocol in docker dispatcher locally? | Community
Skip to main content
January 28, 2025
Solved

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

  • January 28, 2025
  • 2 replies
  • 1059 views

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/dispatcher-ssl
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

 

Best answer by AmitVishwakarma

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.

2 replies

Shiv_Prakash_Patel
Community Advisor
Community Advisor
January 28, 2025
jorganerAuthor
January 29, 2025

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

AmitVishwakarma
Community Advisor
Community Advisor
February 2, 2025

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.

AmitVishwakarma
Community Advisor
AmitVishwakarmaCommunity AdvisorAccepted solution
Community Advisor
February 2, 2025

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.

jorganerAuthor
February 5, 2025

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.