Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How i can l use custom domain into docker configuration? #99

Open
sunilit42 opened this issue Apr 12, 2023 · 4 comments
Open

How i can l use custom domain into docker configuration? #99

sunilit42 opened this issue Apr 12, 2023 · 4 comments

Comments

@sunilit42
Copy link

Hello,

How i can set domain with docker setup ?

@vtsykun
Copy link
Owner

vtsykun commented Apr 12, 2023

You can use nginx reverse proxy

server {
    listen *:443 ssl http2;

    server_name example.com;

    ssl_certificate /etc/nginx/ssl/example.crt;
    ssl_certificate_key /etc/nginx/ssl/example.key;
    ssl_ciphers 'ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:ECDHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4';

    gzip_vary on;
    gzip_proxied any;
    gzip_comp_level 6;
    gzip_buffers 16 16k;
    gzip_http_version 1.1;
    gzip_min_length 2048;
    gzip_types text/css application/javascript text/javascript application/json;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-Proto https;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8082/; # port replace 
    }
}

@sunilit42
Copy link
Author

@vtsykun
Copy link
Owner

vtsykun commented Apr 12, 2023

Yes it's ok. docker container accept all hosts and use own port. Usually host routing is done in reverse proxy, like nginx/apache nginx-certbot

@sunilit42
Copy link
Author

@vtsykun can you give example how i can setup with docker?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants