mirror of
https://github.com/mastodon/mastodon.git
synced 2025-02-11 17:35:07 +00:00
nginx: renaming @proxy block to @mastodon
If multiple sites are hosted on server, a common `@proxy` block name may cause a conflict if another site uses a block with same name.
This commit is contained in:
parent
e8a75694cf
commit
e204c306cd
6
dist/nginx.conf
vendored
6
dist/nginx.conf
vendored
|
@ -67,11 +67,11 @@ server {
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||||
try_files $uri @proxy;
|
try_files $uri @mastodon;
|
||||||
}
|
}
|
||||||
|
|
||||||
# If Docker is used for deployment and Rails serves static files,
|
# If Docker is used for deployment and Rails serves static files,
|
||||||
# then needed must replace line `try_files $uri =404;` with `try_files $uri @proxy;`.
|
# then needed must replace line `try_files $uri =404;` with `try_files $uri @mastodon;`.
|
||||||
location ^~ /assets/ {
|
location ^~ /assets/ {
|
||||||
add_header Cache-Control "public, max-age=2419200, must-revalidate";
|
add_header Cache-Control "public, max-age=2419200, must-revalidate";
|
||||||
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
add_header Strict-Transport-Security "max-age=63072000; includeSubDomains";
|
||||||
|
@ -141,7 +141,7 @@ server {
|
||||||
tcp_nodelay on;
|
tcp_nodelay on;
|
||||||
}
|
}
|
||||||
|
|
||||||
location @proxy {
|
location @mastodon {
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user