how to configure multiple domain (virtual host) and multiple virtual port
See original GitHub issueI have run your image with command below.
docker run -d -p 80:80 -v /var/run/docker.sock:/tmp/docker.sock:ro \
--name my-nginx-proxy --network=mynetwork jwilder/nginx-proxy
my software run in single container and listen on port 81
,82
- port
81
designed for domaina.mydomain
- port
82
designed for domainb.mydomain
case 1, I have use these command. It’s work.
docker run -d --network=mynetwork -e VIRTUAL_PORT=81 -e VIRTUAL_HOST=a.mydomain myimage
case 2, I have use these command. It’s work.
docker run -d --network=mynetwork -e VIRTUAL_PORT=82 -e VIRTUAL_HOST=b.mydomain myimage
Question, how to configure for the following situation?
I would like to use port 81
with domain a.mydomain
and port 82
with domain b.mydomain
in single container.
I have tried with the following command. It 's not work.
docker run -d --network=mynetwork -e VIRTUAL_PORT=81,82 -e VIRTUAL_HOST=a.mydomain,b.mydomain myimage
Please help. Thanks you.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:7
- Comments:5
Top Results From Across the Web
How to Host Multiple Websites with Apache Virtual Hosts
Apache's virtual hosts can run multiple websites on a single server. ... Line 4: Add www to your domain name for ServerAlias.
Read more >How To Set Up Apache Virtual Hosts on Ubuntu 18.04
This tutorial will guide you through setting up multiple domains and websites using Apache virtual hosts on an Ubuntu 18.04 server.
Read more >How to Configure Multiple Sites with Apache - Liquid Web
Step 1: Make a Directory for Each Site · Step 2: Set Folder Permissions · Step 3: Set up an Index Page ·...
Read more >VirtualHost Examples - Apache HTTP Server Version 2.4
Running different sites on different ports. ... You have multiple domains going to the same IP and also want to serve multiple ports....
Read more >Serve multiple domains by using virtual hosts - - Rackspace
First you create a folder in your public_html folder with the relevant files for the blog (for example, a WordPress installation). Then you ......
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@jakata007 @first087: Here is a workaround until a new feature is implemented.
Disclaimer: The image for proxying isn’t mine, I haven’t tested this. If for some reason you don’t trust random images, you can always build it from the Dockerfile or make your own image. It should contain something like:
Also, I doubt @jwilder is currently developing new features, see https://github.com/nginx-proxy/nginx-proxy/issues/1304#issuecomment-535290685. So someone would have to make a PR and hope it gets merged.
Many thanks for that workaround @tkw1536 , I was about to setup another registry / nexus just for 1 customer to achieve this.