multiple websites on centos 7 using docker + nginx-proxy + multiple httpd + wildcard cert

by Niclas H   Last Updated June 29, 2018 14:00 PM

I want to set up multiple websites on a centos 7 machinge using docker + nginx-proxy + multiple httpd + wildcard cert.

I am new to docker,but I have successfully got the multiple sites up and running fine on http, but I am having trouble getting HTTPS to work..

docker run -d -p 80:80 -p 443:443 --name nginx-proxy --net nginx-proxy -e DEFAULT_HOST=default -v /var/run/docker.sock:/tmp/docker.sock:ro -v /usr/local/apache2/conf:/usr/local/apache2/conf:ro --restart always jwilder/nginx-proxy

docker run -d --name default --expose 80 --net nginx-proxy -v /var/www/default:/usr/local/apache2/htdocs/ -e VIRTUAL_HOST=default --restart always httpd:2.4

docker run -d --name doc --expose 80 --net nginx-proxy -v /var/www/doc:/usr/local/apache2/htdocs/ -e --restart always httpd:2.4

docker run -d --name img --expose 80 --net nginx-proxy -v /var/www/img:/usr/local/apache2/htdocs/ -e --restart always httpd:2.4

I have read so many forum questions today so I am going nuts over here..

I have the .crt and .key file in the /usr/local/apache2/conf directory. I have tried to name them default.crt and default.key, also and it did not work. I also read that you can define the certificate name using -v CERT_FILE=default if the files are named default.crt and default.key - but still no success.

Please help.

Related Questions

docker-compose force to have index

Updated April 24, 2018 11:00 AM

nginx return not working

Updated November 23, 2015 10:00 AM