|
|
@ -34,6 +34,13 @@ upstream invidious { |
|
|
|
server ${INV_ADDR}:${INV_PORT}; |
|
|
|
server ${INV_ADDR}:${INV_PORT}; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
upstream libreddit { |
|
|
|
|
|
|
|
# Cannot connect to network of this container |
|
|
|
|
|
|
|
server 127.0.0.1 down; |
|
|
|
|
|
|
|
## Can be connected with the network |
|
|
|
|
|
|
|
server ${LRT_ADDR}:${LRT_PORT}; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
server { |
|
|
|
# This is a catch-all hostname (it will never trigger on a real hostname). |
|
|
|
# This is a catch-all hostname (it will never trigger on a real hostname). |
|
|
|
# If an access by IP or by an unhandled domain linking to this IP is tried, |
|
|
|
# If an access by IP or by an unhandled domain linking to this IP is tried, |
|
|
@ -78,7 +85,6 @@ server { |
|
|
|
add_header Content-Type text/plain; |
|
|
|
add_header Content-Type text/plain; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
server { |
|
|
@ -96,7 +102,6 @@ server { |
|
|
|
add_header Content-Type text/plain; |
|
|
|
add_header Content-Type text/plain; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
server { |
|
|
@ -114,7 +119,6 @@ server { |
|
|
|
add_header Content-Type text/plain; |
|
|
|
add_header Content-Type text/plain; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
server { |
|
|
@ -158,5 +162,21 @@ server { |
|
|
|
proxy_cache_valid 200 31d; # Used for /videoplayback responses |
|
|
|
proxy_cache_valid 200 31d; # Used for /videoplayback responses |
|
|
|
proxy_cache_valid 302 31d; # Used for /latest_version responses |
|
|
|
proxy_cache_valid 302 31d; # Used for /latest_version responses |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
server { |
|
|
|
|
|
|
|
listen ${NGINX_LISTEN_PORT}; |
|
|
|
|
|
|
|
server_name ${LRT_HOSTNAME}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# Disable do not add the server version in the header |
|
|
|
|
|
|
|
server_tokens off; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
location / { |
|
|
|
|
|
|
|
proxy_pass http://libreddit; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
location = /robots.txt { |
|
|
|
|
|
|
|
add_header Content-Type text/plain; |
|
|
|
|
|
|
|
return 200 "User-agent: *\nDisallow: /\n"; |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|