Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NGiИX reverse proxy support #1676

Closed
make-github-pseudonymous-again opened this issue Oct 23, 2020 · 2 comments
Closed

NGiИX reverse proxy support #1676

make-github-pseudonymous-again opened this issue Oct 23, 2020 · 2 comments
Labels
need/triage Needs initial labeling and prioritization

Comments

@make-github-pseudonymous-again

I failed to find a simple explanation on how to access the UI remotely through NGiИX. Here is what I tried

server {
    server_name sub.example.tld;

    auth_basic 'PROVE IDENTITY';
    auth_basic_user_file /etc/nginx/sub.example.tld/.htpasswd;

    listen [::]:443 ssl; # managed by Certbot
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/sub.example.tld/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/sub.example.tld/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

    rewrite ^/$ /webui/ last;

    location / {
        proxy_pass http://localhost:8080;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }

    location ~ ^/(webui|api)/ {
        proxy_pass http://localhost:5001;
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

server {
    if ($host = sub.example.tld) {
        return 301 https://$host$request_uri;
    } # managed by Certbot

    listen 80;
    listen [::]:80;
    server_name sub.example.tld;
    return 404; # managed by Certbot
}

TLS and Basic Auth work. I get redirected to https://sub.example.tld/ipfs/<some blurb>/#/welcome which displays the UI skeleton. But then nothing else loads. The only thing that triggers a change in the UI is clicking the Settings tab. In devtools (firefox) I see a bunch of 404 GET to URLs looking like https://sub.example.tld/ipfs/<some blurb>/locales/en-US/app.json and also 403 POST https://sub.example.tld/api/v0/stats/bw and http://127.0.0.1:5001/api/v0/stats/bw.

@make-github-pseudonymous-again make-github-pseudonymous-again added the need/triage Needs initial labeling and prioritization label Oct 23, 2020
@welcome
Copy link

welcome bot commented Oct 23, 2020

Thank you for submitting your first issue to this repository! A maintainer will be here shortly to triage and review.
In the meantime, please double-check that you have provided all the necessary information to make this process easy! Any information that can help save additional round trips is useful! We currently aim to give initial feedback within two business days. If this does not happen, feel free to leave a comment.
Please keep an eye on how this issue will be labeled, as labels give an overview of priorities, assignments and additional actions requested by the maintainers:

  • "Priority" labels will show how urgent this is for the team.
  • "Status" labels will show if this is ready to be worked on, blocked, or in progress.
  • "Need" labels will indicate if additional input or analysis is required.

Finally, remember to use https://discuss.ipfs.io if you just need general support.

@jessicaschilling
Copy link
Contributor

jessicaschilling commented Oct 23, 2020

Hi @aureooms -- could you please ask this question in the forums at https://discuss.ipfs.io? Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/triage Needs initial labeling and prioritization
Projects
None yet
Development

No branches or pull requests

2 participants