Answer the question
In order to leave comments, you need to log in
Docker how to attach a domain?
The essence such is the server on which there is Nginx and php. There is a project that I can't touch.
I want to run another project in a separate container on this image ipburger/php7.1-ioncube
https://hub.docker.com/r/ipburger/php7.1-ioncube
How can I attach a domain to it?
I run it like this:
docker run -v /var/www/site.shop/public_html/:/app -p 8150:80 -p 8153:443 -e WEB_ALIAS_DOMAIN=site.shop ipburger/php7.1-ioncube
IP address: the port comes in and everything works 100%
Here is the ngix config
server {
listen 80;
server_name site.shop;
access_log /var/www/site.shop/log/access.log;
error_log /var/www/site.shop/log/error.log;
location / {
proxy_pass http://0.0.0.0:8150;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 180;
}
}
Answer the question
In order to leave comments, you need to log in
Doper what you need to raise nginx in the container. And on the local in nginx, make proxy_pass on localhost:3000.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question