User Tools

Site Tools


nginx

Overview

Nginx server and location block – Explains matching against server and location blocks

Reverse proxy – Explanations and examples

Site configuration

Proxy

Owncloud/Nextcloud

    location / {
        # Nextcloud spesific proxy
        proxy_pass_header Server;
        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;
        proxy_set_header X-Forwarded-host $host;
 
        proxy_pass_header Authorization;
 
        proxy_pass http://192.168.1.218:80;
    }

Other

    location / {
        proxy_pass http://localhost:1338;
        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;
    }
nginx.txt · Last modified: 2022/09/12 00:30 by 127.0.0.1

Except where otherwise noted, content on this wiki is licensed under the following license: CC0 1.0 Universal
CC0 1.0 Universal Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki