mirror of
https://github.com/YunoHost-Apps/soapbox_ynh.git
synced 2024-09-03 20:26:11 +02:00
46 lines
1.2 KiB
Nginx Configuration File
Executable file
46 lines
1.2 KiB
Nginx Configuration File
Executable file
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
|
location __PATH__/ {
|
|
|
|
# Path to source
|
|
alias __INSTALL_DIR__/;
|
|
|
|
try_files $uri /index.html;
|
|
|
|
location = /index.html {
|
|
expires 30s;
|
|
}
|
|
|
|
# the nginx default is 1m, not enough for large media uploads
|
|
client_max_body_size 40m;
|
|
|
|
# Prevent useless logs
|
|
location = /favicon.ico {
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
location = /robots.txt {
|
|
allow all;
|
|
log_not_found off;
|
|
access_log off;
|
|
}
|
|
|
|
# Deny access to hidden files and directories
|
|
location ~ ^/(.+/|)\.(?!well-known\/) {
|
|
deny all;
|
|
}
|
|
|
|
# here goes long list of what we will use from real instance
|
|
location ~ ^/(api|.well-known|nodeinfo|proxy|media|emoji|oauth|favicon.*) {
|
|
|
|
proxy_pass $scheme://127.0.0.1$request_uri;
|
|
# proxy_redirect $scheme://__DOMAIN__$request_uri $scheme://soapbox.__DOMAIN__$request_uri;
|
|
proxy_set_header Host __BACKEND__;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
|
|
# doesn't work with some browsers
|
|
# return 308 $scheme://__DOMAIN__$request_uri;
|
|
}
|
|
|
|
# Include SSOWAT user panel.
|
|
include conf.d/yunohost_panel.conf.inc;
|
|
}
|