nginx redirection to subdomain thats a proxy to another domain The Next CEO of Stack Overflowwhat's wrong with this configuration for nginx as reverse proxy for node.js?nginx proxy pass with php and relative pathExpress - req.ip returns 127.0.0.1SSL for domain, including subdomainsLetsencrypt cert cannot be updated with nginxWordpress constant redirect with nginx upstreamKeycloak Redirect url with nginx is going to http rather than httpsnginx docker compose redirect delayCannot get index.php page to display in docker containerNGINX: multiple proxy pass for same domain but different ports

Why did the Drakh emissary look so blurred in S04:E11 "Lines of Communication"?

Physiological effects of huge anime eyes

Raspberry pi 3 B with Ubuntu 18.04 server arm64: what pi version

Read/write a pipe-delimited file line by line with some simple text manipulation

How to compactly explain secondary and tertiary characters without resorting to stereotypes?

What does this strange code stamp on my passport mean?

Is it okay to majorly distort historical facts while writing a fiction story?

A hang glider, sudden unexpected lift to 25,000 feet altitude, what could do this?

Would a grinding machine be a simple and workable propulsion system for an interplanetary spacecraft?

How dangerous is XSS

How should I connect my cat5 cable to connectors having an orange-green line?

What steps are necessary to read a Modern SSD in Medieval Europe?

Find a path from s to t using as few red nodes as possible

Find the majority element, which appears more than half the time

Early programmable calculators with RS-232

Gödel's incompleteness theorems - what are the religious implications?

Oldie but Goldie

Is it correct to say moon starry nights?

Finitely generated matrix groups whose eigenvalues are all algebraic

Creating a script with console commands

MT "will strike" & LXX "will watch carefully" (Gen 3:15)?

Do I need to write [sic] when including a quotation with a number less than 10 that isn't written out?

Calculating discount not working

How to coordinate airplane tickets?



nginx redirection to subdomain thats a proxy to another domain



The Next CEO of Stack Overflowwhat's wrong with this configuration for nginx as reverse proxy for node.js?nginx proxy pass with php and relative pathExpress - req.ip returns 127.0.0.1SSL for domain, including subdomainsLetsencrypt cert cannot be updated with nginxWordpress constant redirect with nginx upstreamKeycloak Redirect url with nginx is going to http rather than httpsnginx docker compose redirect delayCannot get index.php page to display in docker containerNGINX: multiple proxy pass for same domain but different ports










0















I use nginx to act as a proxy between 2 servers. I have a domain aswell as a subdomain attached to an ip. I need to send requests to a third ip via a subdomain for convoluted reasons that I wont bore you with.
An issue im having is communication between servers with rest. Any actions I take in my webapp result in




Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID




Ive been trying to figure it out and I got one login request to pass but after that everything stopped working.

The domain I have setup and everything works fine the subdomain looks like this



server 
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server_name api.example.com www.api.example.com;

location /
proxy_pass "http://x.x.x.x:8080$request_uri";
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-Client-DN $ssl_client_s_dn;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;





Im relative new to nginx but to me I think this should work as a proxy. Ive had it call one request but fail there after could it either be a firewall/network issue?










share|improve this question






















  • That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

    – Chase
    Mar 8 at 19:38











  • Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

    – Dennington-bear
    Mar 11 at 14:10















0















I use nginx to act as a proxy between 2 servers. I have a domain aswell as a subdomain attached to an ip. I need to send requests to a third ip via a subdomain for convoluted reasons that I wont bore you with.
An issue im having is communication between servers with rest. Any actions I take in my webapp result in




Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID




Ive been trying to figure it out and I got one login request to pass but after that everything stopped working.

The domain I have setup and everything works fine the subdomain looks like this



server 
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server_name api.example.com www.api.example.com;

location /
proxy_pass "http://x.x.x.x:8080$request_uri";
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-Client-DN $ssl_client_s_dn;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;





Im relative new to nginx but to me I think this should work as a proxy. Ive had it call one request but fail there after could it either be a firewall/network issue?










share|improve this question






















  • That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

    – Chase
    Mar 8 at 19:38











  • Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

    – Dennington-bear
    Mar 11 at 14:10













0












0








0








I use nginx to act as a proxy between 2 servers. I have a domain aswell as a subdomain attached to an ip. I need to send requests to a third ip via a subdomain for convoluted reasons that I wont bore you with.
An issue im having is communication between servers with rest. Any actions I take in my webapp result in




Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID




Ive been trying to figure it out and I got one login request to pass but after that everything stopped working.

The domain I have setup and everything works fine the subdomain looks like this



server 
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server_name api.example.com www.api.example.com;

location /
proxy_pass "http://x.x.x.x:8080$request_uri";
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-Client-DN $ssl_client_s_dn;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;





Im relative new to nginx but to me I think this should work as a proxy. Ive had it call one request but fail there after could it either be a firewall/network issue?










share|improve this question














I use nginx to act as a proxy between 2 servers. I have a domain aswell as a subdomain attached to an ip. I need to send requests to a third ip via a subdomain for convoluted reasons that I wont bore you with.
An issue im having is communication between servers with rest. Any actions I take in my webapp result in




Failed to load resource: net::ERR_CERT_COMMON_NAME_INVALID




Ive been trying to figure it out and I got one login request to pass but after that everything stopped working.

The domain I have setup and everything works fine the subdomain looks like this



server 
listen 443 ssl; # managed by Certbot
ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; # managed by Certbot
include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

server_name api.example.com www.api.example.com;

location /
proxy_pass "http://x.x.x.x:8080$request_uri";
proxy_redirect off;
proxy_http_version 1.1;
proxy_set_header Host $host;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Client-Verify SUCCESS;
proxy_set_header X-Client-DN $ssl_client_s_dn;
proxy_set_header X-SSL-Subject $ssl_client_s_dn;
proxy_set_header X-SSL-Issuer $ssl_client_i_dn;
proxy_read_timeout 1800;
proxy_connect_timeout 1800;





Im relative new to nginx but to me I think this should work as a proxy. Ive had it call one request but fail there after could it either be a firewall/network issue?







nginx






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 8 at 19:21









Dennington-bearDennington-bear

91131135




91131135












  • That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

    – Chase
    Mar 8 at 19:38











  • Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

    – Dennington-bear
    Mar 11 at 14:10

















  • That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

    – Chase
    Mar 8 at 19:38











  • Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

    – Dennington-bear
    Mar 11 at 14:10
















That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

– Chase
Mar 8 at 19:38





That error smells like a TLS cert issue, as in you might be missing a domain on your cert - I see you're using both the naked api. and www.api. and this could be what is tripping you up. Try making requests to the domain that is on the cert.

– Chase
Mar 8 at 19:38













Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

– Dennington-bear
Mar 11 at 14:10





Went through it in the end you were right @Chase the www. was colliding and causing an issue. But it also was that Cors were not enabled and because I was sending over content like video Nginx buffer request was timing out. Thanks for the info

– Dennington-bear
Mar 11 at 14:10












0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069680%2fnginx-redirection-to-subdomain-thats-a-proxy-to-another-domain%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55069680%2fnginx-redirection-to-subdomain-thats-a-proxy-to-another-domain%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Identity Server 4 is not redirecting to Angular app after login2019 Community Moderator ElectionIdentity Server 4 and dockerIdentityserver implicit flow unauthorized_clientIdentityServer Hybrid Flow - Access Token is null after user successful loginIdentity Server to MVC client : Page Redirect After loginLogin with Steam OpenId(oidc-client-js)Identity Server 4+.NET Core 2.0 + IdentityIdentityServer4 post-login redirect not working in Edge browserCall to IdentityServer4 generates System.NullReferenceException: Object reference not set to an instance of an objectIdentityServer4 without HTTPS not workingHow to get Authorization code from identity server without login form

2005 Ahvaz unrest Contents Background Causes Casualties Aftermath See also References Navigation menue"At Least 10 Are Killed by Bombs in Iran""Iran"Archived"Arab-Iranians in Iran to make April 15 'Day of Fury'"State of Mind, State of Order: Reactions to Ethnic Unrest in the Islamic Republic of Iran.10.1111/j.1754-9469.2008.00028.x"Iran hangs Arab separatists"Iran Overview from ArchivedConstitution of the Islamic Republic of Iran"Tehran puzzled by forged 'riots' letter""Iran and its minorities: Down in the second class""Iran: Handling Of Ahvaz Unrest Could End With Televised Confessions""Bombings Rock Iran Ahead of Election""Five die in Iran ethnic clashes""Iran: Need for restraint as anniversary of unrest in Khuzestan approaches"Archived"Iranian Sunni protesters killed in clashes with security forces"Archived

Can't initialize raids on a new ASUS Prime B360M-A motherboard2019 Community Moderator ElectionSimilar to RAID config yet more like mirroring solution?Can't get motherboard serial numberWhy does the BIOS entry point start with a WBINVD instruction?UEFI performance Asus Maximus V Extreme