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

Thal And Out Agency railway station See also References External links Navigation menuOfficial Web Site of Pakistan RailwaysArchivedOfficial Web Site of Pakistan Railwayseeexpanding ite

Posting a File and Associated Data to a RESTful WebService preferably as JSON2019 Community Moderator ElectionREST URI convention - Singular or plural name of resource while creating itUploading both data and files in one form using Ajax?How do I upload a file with metadata using a REST web service?REST API - file (ie images) processing - best practicesSpring: JSON data and file in the same requestREST API Put large dataPosting a file and JSON data to Spring rest serviceRESTful Web Service Upload/Download Large Data With JSONREST API Design sending JSON data and a file to the api in same requestPost JSONArray to REST servicePUT vs. POST in RESTParsing values from a JSON file?JavaScript/jQuery to download file via POST with JSON dataHow do I upload a file with metadata using a REST web service?How to POST JSON data with Curl from Terminal/Commandline to Test Spring REST?Separate REST JSON API server and client?what's the correct way to send a file from REST web service to client?How do I write JSON data to a file?What is “406-Not Acceptable Response” in HTTP?REST API - file (ie images) processing - best practices

How can I change the color of pagination dots of UIPageControl?How to change UIPageControl dotsIs there a way to change page indicator dots colorCustomize dot with image of UIPageControl at index 0 of UIPageControlNo visible @interface for 'NSObject<PageControlDelegate>' declares the selector 'pageControlPageDidChange:'How to change the color of pagination dots in UIPageControl with a different color per pagepagecontrol indicator custom image instead of DefaultChanging the colour of UIPageControl dots in MonoTouchpagecontrol selectable page visibility color?Alternative way to load ViewControllers on a UIPageControlHow to set only layer.border-color for UIpage control dots in swiftHow can I develop for iPhone using a Windows development machine?How to change the name of an iOS app?UITableView - change section header coloruipagecontrol indicator(dot)issueCustom UIPageControl dots color not changingchange the interspace between UIPageControl dotsHow to change Status Bar text color in iOSHow can I change image tintColor in iOS and WatchKitUIPageControl dots with larger space in between each dotsHow to change the color of pagination dots in UIPageControl with a different color per page