ByteInternet / hypernode-docker

Fast and easy Docker for Magento development
https://community.hypernode.io/hypernode-docker
35 stars 8 forks source link

Managed Vhosts HTTPS support #67

Open ghost opened 2 years ago

ghost commented 2 years ago

In the latest images ssl 443 support seems not be enabled by default.

Adding the following nginx conf in /etc/nginx/sites/https.dummytag.hypernode.io.conf makes it work again. I was not able to auto generate this with the managed vhost commands

include /etc/nginx/app/dummytag.hypernode.io/http.*;

# SSL
server {
    server_name dummytag.hypernode.io;
    listen 443 ssl http2 default_server;
    set $_HN_ENVIRONMENT "production";

    include /etc/nginx/ssl_rules_intermediate.conf;
    ssl_certificate "/etc/nginx/ssl/*.hypernode.local.crtkeyca";
    ssl_certificate_key "/etc/nginx/ssl/*.hypernode.local.crtkeyca";

    include /etc/nginx/server.generic_includes.conf;
    include /etc/nginx/app/server.*;
    include /etc/nginx/app/dummytag.hypernode.io/server.*;
    include /etc/nginx/app/dummytag.hypernode.io/public.*;
}

# SSL staging
server {
    server_name dummytag.hypernode.io;
    listen 8443 ssl http2 default_server;
    set $_HN_ENVIRONMENT "staging";

    include /etc/nginx/ssl_rules_intermediate.conf;
    ssl_certificate "/etc/nginx/ssl/*.hypernode.local.crtkeyca";
    ssl_certificate_key "/etc/nginx/ssl/*.hypernode.local.crtkeyca";

    include /etc/nginx/server.generic_includes.conf;
    include /etc/nginx/app/server.*;
    include /etc/nginx/app/dummytag.hypernode.io/server.*;
    include /etc/nginx/app/dummytag.hypernode.io/staging.*;
}

bash /etc/my_init.d/60_restart_services.sh