joni1802 / ts3-manager

A modern web interface for maintaining Teamspeak3 servers
https://www.ts3.app
MIT License
189 stars 23 forks source link

Ability to run on a subdirectory #38

Closed EinDev closed 3 years ago

EinDev commented 3 years ago

Currently it seems that all the links are absolute, which prevents it running on a subdirectory. I would like to use it on a reverse proxy on a subdirectory, which currently doesn't work.

I can fix this myself, so i would be glad to make this my first commit :)

joni1802 commented 3 years ago

The TS3 Manager is not using any absolute paths. Only relative paths are served by the app (see screenshot). If you want to access the TS3 Manager behind a reverse proxy over a subpath adding a rewrite condition should do the job. Bild_2021-04-11_203345

EinDev commented 3 years ago

I am sorry, absolute paths is the wrong word. I was talking about using "css/" instead of "/css", so it will work without the rewrite condition. Unfortunately IIS on Windows Server doesn't have such a rewrite condition (AFAIK), so i cannot get it to work this way on Windows.

joni1802 commented 3 years ago

This "css/" instead of "/css" is not possibly due to the overall build process of the app. Take a look at the following article which describes rewrite conditions in IIS: https://docs.microsoft.com/en-us/iis/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing