mirror of
https://github.com/YunoHost-Apps/coin_ynh.git
synced 2024-09-03 18:16:26 +02:00
Fix nginx conf ...
This commit is contained in:
parent
40a1084f4a
commit
2b85035f3e
1 changed files with 31 additions and 30 deletions
|
@ -1,30 +1,31 @@
|
|||
location PATHTOCHANGE {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
try_files $uri @YNH_APP_INSTANCE_NAME;
|
||||
}
|
||||
location /protected/ {
|
||||
internal;
|
||||
alias /opt/YNH_APP_INSTANCE_NAME/YNH_APP_INSTANCE_NAME/smedia/;
|
||||
}
|
||||
|
||||
location PATHTOCHANGEmedia {
|
||||
alias /opt/YNH_APP_INSTANCE_NAME/media;
|
||||
}
|
||||
|
||||
location PATHTOCHANGEstatic {
|
||||
alias /opt/YNH_APP_INSTANCE_NAME/static;
|
||||
}
|
||||
|
||||
location PATHTOCHANGEassets {
|
||||
alias /opt/YNH_APP_INSTANCE_NAME/static;
|
||||
}
|
||||
|
||||
location @YNH_APP_INSTANCE_NAME {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://unix:/opt/YNH_APP_INSTANCE_NAME/sock;
|
||||
}
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
try_files $uri @__NAME__;
|
||||
}
|
||||
location __PATH__/protected/ {
|
||||
internal;
|
||||
alias /opt/__NAME__/__NAME__/smedia/;
|
||||
}
|
||||
|
||||
location __PATH__/media {
|
||||
alias /opt/__NAME__/media;
|
||||
}
|
||||
|
||||
location __PATH__/static {
|
||||
alias /opt/__NAME__/static;
|
||||
}
|
||||
|
||||
location __PATH__/assets {
|
||||
alias /opt/__NAME__/static;
|
||||
}
|
||||
|
||||
location @__NAME__ {
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
||||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_pass http://unix:/opt/__NAME__/sock;
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue