this post was submitted on 24 Jun 2023
-1 points (0.0% liked)

Selfhosted

40113 readers
803 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 1 year ago
MODERATORS
 

Been trying to work out how to do this but it seems be way out of my league.

Does anybody have a guide or instructions?

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 1 points 1 year ago

This is the nginx.conf file for my external proxy:

server {
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name ;

    include /config/nginx/ssl.conf;

    location / {
        include /config/nginx/proxy.conf;
        include /config/nginx/resolver.conf;
#        set $upstream_app lemmy;
        set $upstream_app proxy;
        set $upstream_port 8536;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
#        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header X-Real-IP $remote_addr;
#        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        client_max_body_size 50M;            
    }
}

access_log /var/log/nginx/access.log combined;

You’ll need to change  to the appropriate value. I’m forwarding requests to the proxy container referenced by the compose file