- 162
- 45
- NAS
- DS918+ (8GB RAM, 4x WD RED 4TB SHR) ; EATON Ellipse PRO 1200FR
- Operating system
- Windows
- Mobile operating system
- Android
Last edited:
Hi all,
First of all, happy holidays to everyone.
Since I have installed BitwardenRS and configured the NGINX-RP to access it, I was wondering if I could also use NGINX to redirect every other applications of the NAS.
I was able to test various things but it still do not suit my expectations.
[tl;dr]tried to setup reverse proxy on nginx for all my dsm apps and docker app, failed at almost 1st step, rolled back, need advice/guidance...[/tl;dr]
Currently I can (from LAN and WAN) :
Here is what I want to achieve (from LAN and WAN) :
Below is the working configuration for NGINX RP for Bitwarden :
I wanted to test it step by step so, first I tried to modify the "location /" section with location /bitwarden as below but not working, even worse it broke my access to DSM with https://my_ddns:dsmapps_custom_port/:
Any one has already tried to do what I want to do ?
Sorry for the long post
First of all, happy holidays to everyone.
Since I have installed BitwardenRS and configured the NGINX-RP to access it, I was wondering if I could also use NGINX to redirect every other applications of the NAS.
I was able to test various things but it still do not suit my expectations.
[tl;dr]tried to setup reverse proxy on nginx for all my dsm apps and docker app, failed at almost 1st step, rolled back, need advice/guidance...[/tl;dr]
Currently I can (from LAN and WAN) :
Code:
access DSM with https://my_ddns:dsmapps_custom_port/
access DS Drive with https://my_ddns:dsmapps_custom_port/<the alias to DSDrive configured in apps portal>
access DS Moments with https://my_ddns:dsmapps_custom_port/<the alias to DSMoments configured in apps portal>
access BitwardenRS with https://my_ddns:bitwarden_custom_public_port/ redirecting to https://127.0.0.1:bitwarden_custom_local_port/
... etc
Here is what I want to achieve (from LAN and WAN) :
Code:
access DSM with https://my_ddns/<an alias to DSM> redirecting to https://127.0.0.1:my_dsmapps_custom_port/
access DS Drive with https://my_ddns/<an alias to DSDrive> redirecting to https://127.0.0.1:my_dsmapps_custom_port/<the alias to DSDrive configured in apps portal>
access DS Moments with https://my_ddns/<an alias to DSMoments> redirecting to https://127.0.0.1:my_dsmapps_custom_port/<the alias to DSMoments configured in apps portal>
access BiwardenRS with https://my_ddns/<an alias to Bitwarden RS> redirecting to https://127.0.0.1:bitwarden_custom_local_port/
... etc
Below is the working configuration for NGINX RP for Bitwarden :
Code:
server {
listen <custom_bitwarden_public_port> ssl;
listen [::]:<custom_bitwarden_public_port> ssl;
server_name <my_ddns>;
ssl_certificate /PATH/TO/fullchain.pem;
ssl_certificate_key /PATH/TO/privkey.pem;
location / {
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_intercept_errors off;
proxy_http_version 1.1;
proxy_set_header Host $http_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://127.0.0.1:<custom_bitwarden_local_port>;
}
location /notifications/hub {
proxy_pass http://127.0.0.1:<another_custom_bitwarden_local_port>;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
location /notifications/hub/negotiate {
proxy_pass http://127.0.0.1:<custom_bitwarden_local_port>;
}
error_page 403 404 500 502 503 504 @error_page;
location @error_page {
root /usr/syno/share/nginx;
rewrite (.*) /error.html break;
allow all;
}
}
I wanted to test it step by step so, first I tried to modify the "location /" section with location /bitwarden as below but not working, even worse it broke my access to DSM with https://my_ddns:dsmapps_custom_port/:
Code:
location /bitwarden {
proxy_connect_timeout 60;
proxy_read_timeout 60;
proxy_send_timeout 60;
proxy_intercept_errors off;
proxy_http_version 1.1;
proxy_set_header Host $http_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://127.0.0.1:<custom_bitwarden_local_port>/;
}
Any one has already tried to do what I want to do ?
Sorry for the long post