Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

two virtual hosts with same domain name but different ports?

$
0
0
Hi,

I have a virtual host running fine, say:

sample.com
server {
listen 80;
server_name sample.com;
...




now I need to set up another virtual host but same name, say:

sample.com:3000

I put the new conf file:
server {
listen 3000;
server_name sample.com;
...


but http://sample.com:3000 always goes back to sample.com, any idea how to make it work? Thanks

Chen

Viewing all articles
Browse latest Browse all 4759

Trending Articles