vhosts across different machines
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I've set up vhosts in my LAMP stack, with one IP and a domain plus subdomains working on that same stack. My problem is I spun another nginx server for gitlabs(seperate VM) that I want a subdomain of repo.example.com to route to, however it defaults to the LAMP stack instead.
Am I correct that I should run a /etc/hosts file for each server listing the domains that should reach which each one uses? I'm trying to narrow down if my problem is with NGINX configs or my set up in general.
Basic info
- noip.com --> single home ip
- LAMP stack in a VM (working)
- example.com
- a.example.com
- b.example.com
- NGINX stack on a VM running gitlabs
- repo.example.com (defaults to example.com)
nginx hosts apache-virtualhost
add a comment |
up vote
0
down vote
favorite
I've set up vhosts in my LAMP stack, with one IP and a domain plus subdomains working on that same stack. My problem is I spun another nginx server for gitlabs(seperate VM) that I want a subdomain of repo.example.com to route to, however it defaults to the LAMP stack instead.
Am I correct that I should run a /etc/hosts file for each server listing the domains that should reach which each one uses? I'm trying to narrow down if my problem is with NGINX configs or my set up in general.
Basic info
- noip.com --> single home ip
- LAMP stack in a VM (working)
- example.com
- a.example.com
- b.example.com
- NGINX stack on a VM running gitlabs
- repo.example.com (defaults to example.com)
nginx hosts apache-virtualhost
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago
add a comment |
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I've set up vhosts in my LAMP stack, with one IP and a domain plus subdomains working on that same stack. My problem is I spun another nginx server for gitlabs(seperate VM) that I want a subdomain of repo.example.com to route to, however it defaults to the LAMP stack instead.
Am I correct that I should run a /etc/hosts file for each server listing the domains that should reach which each one uses? I'm trying to narrow down if my problem is with NGINX configs or my set up in general.
Basic info
- noip.com --> single home ip
- LAMP stack in a VM (working)
- example.com
- a.example.com
- b.example.com
- NGINX stack on a VM running gitlabs
- repo.example.com (defaults to example.com)
nginx hosts apache-virtualhost
I've set up vhosts in my LAMP stack, with one IP and a domain plus subdomains working on that same stack. My problem is I spun another nginx server for gitlabs(seperate VM) that I want a subdomain of repo.example.com to route to, however it defaults to the LAMP stack instead.
Am I correct that I should run a /etc/hosts file for each server listing the domains that should reach which each one uses? I'm trying to narrow down if my problem is with NGINX configs or my set up in general.
Basic info
- noip.com --> single home ip
- LAMP stack in a VM (working)
- example.com
- a.example.com
- b.example.com
- NGINX stack on a VM running gitlabs
- repo.example.com (defaults to example.com)
nginx hosts apache-virtualhost
nginx hosts apache-virtualhost
edited 2 hours ago
asked 7 hours ago
dawja
285
285
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago
add a comment |
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago
add a comment |
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f481168%2fvhosts-across-different-machines%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
I don't think you've explained your question very well. I can't tell if you need Apache help, nginx help, networking help, or something else.
– Cupcake Protocol
5 hours ago
I hope I simplified it. I don't think I need apache help, but I'm asking to see if my set up is the problem or if I have to look into my nginx configs.
– dawja
2 hours ago
What are you using /etc/hosts for? It's a poor substitute for real DNS. If you can't use real DNS, okay maybe. From your point 3 (as written now), I think your issue is you need an nginx virtual host configured. Are the hosts in 2 and 3 using the same IP ? If so how do you expect to route between nginx and apache? Are you using different ports? Are you binding one to a private IP and the other to a localhost IP and proxying?
– Cupcake Protocol
43 mins ago