Comment on Beginners Questions about Audiobookshelf, DNS and nginx

communism@lemmy.ml ⁨2⁩ ⁨days⁩ ago

You get a domain name, and use an A record to point it towards your server’s public IP address.

You tell nginx to forward requests to a given domain. For instance, you could tell nginx to forward requests to foo.bar.com to 127.0.0.1:1337. To do this:

http {
    server {
        server_name foo.bar.com;
        listen 80;
        
        location / {
            proxy_pass http://127.0.0.1:1337$request_uri;
        }
    }
}

Note that this is a very basic setup that doesn’t have HTTPS or anything. If you want an SSL certificate, look into Let’s Encrypt and Certbot.

Also, the service you’re hosting (which I’m not familiar with) may have an example reverse proxy config you should use as a starting point if it exists.

source
Sort:hotnewtop