JavaScript I am trying to host a website using nginx reverse proxy method, i am running two Node.js applications

My first application is running on 8080, the second application is running on 8081, The code is as follows:

server {
    listen 80;

    server_name greatwallprojects.com;

    location / {
        proxy_pass http://127.0.0.1:8080;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_cache_bypass $http_upgrade;
    }

    location /pingtest {
            proxy_pass http://127.0.0.1:8081;
            proxy_http_version 1.1;
            proxy_set_header Upgrade $http_upgrade;
            proxy_set_header Connection 'upgrade';
            proxy_set_header Host $host;
            proxy_cache_bypass $http_upgrade;
        }
    }

I basically see a blank page once i try to open the second location page, the homepage works fine, but http://greatwallprojects.com/pingtest loads a blank page. If the reverse proxy method has issues should i try other methods?. Can anyone point out the issue?

Answer:1

I run the below JS script but just find func2() output is foobar, not George, who can explain why func2 = func.bind(someuser) doesn't bind someuser to func? var someuser = { name: 'George', ...

I run the below JS script but just find func2() output is foobar, not George, who can explain why func2 = func.bind(someuser) doesn't bind someuser to func? var someuser = { name: 'George', ...

I'm pretty new at JavaScript. I have a variable and two buttons to add or minus 1 from that variable, which works; However I want to make is so that when the variable = 0 the minus button disables, so ...

I'm pretty new at JavaScript. I have a variable and two buttons to add or minus 1 from that variable, which works; However I want to make is so that when the variable = 0 the minus button disables, so ...

I have a progress bar, and I have my js getting the value of it with document.getElementsByTagName(progressbar)[num]. I have this in multiple functions, but when one of the progress bars are removed, ...

I have a progress bar, and I have my js getting the value of it with document.getElementsByTagName(progressbar)[num]. I have this in multiple functions, but when one of the progress bars are removed, ...

I have a question which I still haven't found the answer to. When I use this method to capture a mouse up event: <div onmouseup="/*Script to be executed*/"></div> Is that more ...

I have a question which I still haven't found the answer to. When I use this method to capture a mouse up event: <div onmouseup="/*Script to be executed*/"></div> Is that more ...

  1. javascript addeventlistener onmouseup
  2. window addeventlistener onmouseup
  3. js addeventlistener onmouseup
  4. document addeventlistener onmouseup