Reverse Proxy: Remap DSM login problem

Currently reading
Reverse Proxy: Remap DSM login problem

Hi!

I use the built-in NGINX proxy on my private DS. I map the DSM login from ds.example.com to https://localhost:5001 , which works great.
Also, the mapping for OpenProject for ds.example.com/pm/ works. For full info, I have the web station running NGINX.
My file looks like this.

Code:
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name ds.example.com;

    #----- OpenProject  ---- #
    location /pm/ {

        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto https;
        proxy_pass http://localhost:32796/pm/;
    }

    #----- DSM          ---- #
    location / {
        proxy_set_header        Host                $host;
        proxy_pass https://localhost:5001;
    }
}


I would like to do it similarly with a second Rackstation. However, with a small difference.
The goal this time would be to map rs.example.com/test/ to the DSM login.

Code:
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name rs.example.com;

    #----- DSM          ---- #
    location /test/ {
        proxy_set_header        Host                $host;
        proxy_pass https://localhost:5001;
    }
}

However, this does not work. Can someone perhaps tell me what this could be or where my error is? No matter if the webstation is running or not. It does not work.
With Webstation running, I get the message, "We're sorry, the page you are looking for could not be found."

Diskstation and Rackstation running DSM 7.1.1 (latest Version)

Would be great if someone could give us some hints or tips. Thank you.
 
I'm uncertain if I'm understanding you correctly.

ds.example.com is running on my DS918+ since 2 years.
rs.example.com is a new rackstation that I just installed. (RS1221+)

The config of ds.example.com works on rs.example.com.
The config of rs.example.com does not work on rs.example.com nor on ds.example.com.
 
I'm uncertain if I'm understanding you correctly.

ds.example.com is running on my DS918+ since 2 years.
rs.example.com is a new rackstation that I just installed. (RS1221+)

The config of ds.example.com works on rs.example.com.
The config of rs.example.com does not work on rs.example.com nor on ds.example.com.
Are the two configs part of a single reverse proxy instance or does each "live" on a separate NAS?
 
I'll try to explain it better.

At home I use a DS918+ with the following setup.

Code:
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name ds.example.com;

    #----- OpenProject  ---- #
    location /pm/ {

        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto https;
        proxy_pass http://localhost:32796/pm/;
    }

    #----- DSM          ---- #
    location / {
        proxy_set_header        Host                $host;
        proxy_pass https://localhost:5001;
    }
}
This code was placed under /usr/local/etc/nginx/sites-enabled.

I can access my DSM login page on the internal network as well as from the internet.
Works fine.


At a friends house, I am setting up the RS1221+.
I would like to put the DSM login page on rs.example.com/dsm. It doesn't have to be /dsm/ in case of a name conflict.
In doing so, I put the following coding back under /usr/local/etc/nginx/sites-enabled.

Code:
server {
    listen 443 ssl;
    listen [::]:443 ssl;

    server_name rs.example.com;

    #----- DSM          ---- #
    location /test/ {
        proxy_set_header        Host                $host;
        proxy_pass https://localhost:5001;
    }
}

However, on the rackstation I get the "Site not found" site returned.
When I change the coding on the rackstation to the same coding as on my DS918+. The mapping works.
If I want to put the login on ds.example.com/dsm on my DS918+, I get the same behavior as on the rackstation.

Routing and rest of config shouldn't matter since I get the same behavior on my DS and on the RS.
The question of what I have, why is mapping from rs.example.com/dsm -> localhost:5001 not possible. Mapping from ds.example.com to localhost:5001 however is.
Basically, this is the same config.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
Does this only happen when you try to access packages via the 'office' links in Drive's menu? And have you...
Replies
1
Views
469
  • Question
Ofc you can make a single compose for this no problem. Personally I like to separate front end apps from...
Replies
10
Views
1,240
  • Solved
I think it was point 1 that was messing me up. And it was a simple fix, honestly. We'll have to see if I...
Replies
3
Views
1,569
I accessed to log and when I trying connect I have message: "SSTP_DUPLEX_POST...
Replies
9
Views
1,662
  • Solved
Glad it’s working. Now you can help the next person! No reward necessary 😎
Replies
14
Views
2,267
The thing is... Too many users freeload off Marius and then come to the forums for assistance. Give Marius...
Replies
4
Views
1,725

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top