Nginx reverse proxy for multiple domains and subdomains
Clash Royale CLAN TAG#URR8PPP
up vote
1
down vote
favorite
I have server running differnt sites and i need to config nginx reverse proxy for that domains(example1.com, example2.com,test.example1.com),where I need to config the domains in nginx for reverse proxy.
nginx reverse-proxy subdomain multiple-instances
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
I have server running differnt sites and i need to config nginx reverse proxy for that domains(example1.com, example2.com,test.example1.com),where I need to config the domains in nginx for reverse proxy.
nginx reverse-proxy subdomain multiple-instances
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
up vote
1
down vote
favorite
up vote
1
down vote
favorite
I have server running differnt sites and i need to config nginx reverse proxy for that domains(example1.com, example2.com,test.example1.com),where I need to config the domains in nginx for reverse proxy.
nginx reverse-proxy subdomain multiple-instances
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
I have server running differnt sites and i need to config nginx reverse proxy for that domains(example1.com, example2.com,test.example1.com),where I need to config the domains in nginx for reverse proxy.
nginx reverse-proxy subdomain multiple-instances
nginx reverse-proxy subdomain multiple-instances
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
asked 2 hours ago


AsWiN KaRtHiK
61
61
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
New contributor
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
AsWiN KaRtHiK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
add a comment |Â
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
2
down vote
multiple server
blocks and proxy_pass http://origin.server
in location
blocks.
For example:
server
test.example1.com;
location /
proxy_pass http://origin.text.example1.com;
server
server_name example1.com;
location /
proxy_pass http://origin.example1.com;
server
server_name example2.com;
location /
proxy_pass http://origin.example2.com;
nginx Beginner's Guide and
Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
multiple server
blocks and proxy_pass http://origin.server
in location
blocks.
For example:
server
test.example1.com;
location /
proxy_pass http://origin.text.example1.com;
server
server_name example1.com;
location /
proxy_pass http://origin.example1.com;
server
server_name example2.com;
location /
proxy_pass http://origin.example2.com;
nginx Beginner's Guide and
Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.
add a comment |Â
up vote
2
down vote
multiple server
blocks and proxy_pass http://origin.server
in location
blocks.
For example:
server
test.example1.com;
location /
proxy_pass http://origin.text.example1.com;
server
server_name example1.com;
location /
proxy_pass http://origin.example1.com;
server
server_name example2.com;
location /
proxy_pass http://origin.example2.com;
nginx Beginner's Guide and
Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.
add a comment |Â
up vote
2
down vote
up vote
2
down vote
multiple server
blocks and proxy_pass http://origin.server
in location
blocks.
For example:
server
test.example1.com;
location /
proxy_pass http://origin.text.example1.com;
server
server_name example1.com;
location /
proxy_pass http://origin.example1.com;
server
server_name example2.com;
location /
proxy_pass http://origin.example2.com;
nginx Beginner's Guide and
Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.
multiple server
blocks and proxy_pass http://origin.server
in location
blocks.
For example:
server
test.example1.com;
location /
proxy_pass http://origin.text.example1.com;
server
server_name example1.com;
location /
proxy_pass http://origin.example1.com;
server
server_name example2.com;
location /
proxy_pass http://origin.example2.com;
nginx Beginner's Guide and
Server names in nginx document will help you.
More complex configurations(including /etc/nginx/sites-enabled/.conf, /etc/nginx/sites-available/.conf) are available, but that relies on your distribution packages.
answered 37 mins ago


minish
46617
46617
add a comment |Â
add a comment |Â
AsWiN KaRtHiK is a new contributor. Be nice, and check out our Code of Conduct.
AsWiN KaRtHiK is a new contributor. Be nice, and check out our Code of Conduct.
AsWiN KaRtHiK is a new contributor. Be nice, and check out our Code of Conduct.
AsWiN KaRtHiK is a new contributor. Be nice, and check out our Code of Conduct.
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%2fserverfault.com%2fquestions%2f937103%2fnginx-reverse-proxy-for-multiple-domains-and-subdomains%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