fix: locations
This commit is contained in:
parent
e61c815c7c
commit
2d4a4dfe4c
1 changed files with 30 additions and 28 deletions
|
|
@ -40,34 +40,36 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
virtualHosts."localhost" = {
|
virtualHosts."localhost" = {
|
||||||
"/nextcloud/" = {
|
locations = {
|
||||||
priority = 9999;
|
"/nextcloud" = {
|
||||||
extraConfig = ''
|
priority = 9999;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
extraConfig = ''
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-NginX-Proxy true;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||||
proxy_set_header X-Forwarded-Proto http;
|
proxy_set_header X-NginX-Proxy true;
|
||||||
proxy_pass http://127.0.0.1:8080/; # tailing / is important!
|
proxy_set_header X-Forwarded-Proto http;
|
||||||
proxy_set_header Host $host;
|
proxy_pass http://127.0.0.1:8080/; # tailing / is important!
|
||||||
proxy_cache_bypass $http_upgrade;
|
proxy_set_header Host $host;
|
||||||
proxy_redirect off;
|
proxy_cache_bypass $http_upgrade;
|
||||||
'';
|
proxy_redirect off;
|
||||||
};
|
'';
|
||||||
"^~ /.well-known" = {
|
};
|
||||||
priority = 9000;
|
"^~ /.well-known" = {
|
||||||
extraConfig = ''
|
priority = 9000;
|
||||||
absolute_redirect off;
|
extraConfig = ''
|
||||||
location ~ ^/\\.well-known/(?:carddav|caldav)$ {
|
absolute_redirect off;
|
||||||
return 301 /nextcloud/remote.php/dav;
|
location ~ ^/\\.well-known/(?:carddav|caldav)$ {
|
||||||
}
|
return 301 /nextcloud/remote.php/dav;
|
||||||
location ~ ^/\\.well-known/host-meta(?:\\.json)?$ {
|
}
|
||||||
return 301 /nextcloud/public.php?service=host-meta-json;
|
location ~ ^/\\.well-known/host-meta(?:\\.json)?$ {
|
||||||
}
|
return 301 /nextcloud/public.php?service=host-meta-json;
|
||||||
location ~ ^/\\.well-known/(?!acme-challenge|pki-validation) {
|
}
|
||||||
return 301 /nextcloud/index.php$request_uri;
|
location ~ ^/\\.well-known/(?!acme-challenge|pki-validation) {
|
||||||
}
|
return 301 /nextcloud/index.php$request_uri;
|
||||||
try_files $uri $uri/ =404;
|
}
|
||||||
'';
|
try_files $uri $uri/ =404;
|
||||||
|
'';
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue