Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SUBFOLDER is not working in websockify resource #6

Closed
1 task done
ramkicse opened this issue Feb 1, 2024 · 5 comments
Closed
1 task done

SUBFOLDER is not working in websockify resource #6

ramkicse opened this issue Feb 1, 2024 · 5 comments

Comments

@ramkicse
Copy link

ramkicse commented Feb 1, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

I deployed this docker image under http://localhost:8080/ramki-gui-2l68k/ URL,

I run following docker command

docker run --rm -it --security-opt seccomp=unconfined --shm-size="1gb" -e PASSWORD=ramki -e SUBFOLDER=/ramki-gui-2l68k/ -p 8080:3000 lscr.io/linuxserver/webtop:ubuntu-kde

i expected all resources like css and js and others coming from like http://localhost:8080/ramki-gui-2l68k/public/css/kclient.css, http://localhost:8080/ramki-gui-2l68k/audio/socket.io/socket.io.js urls with http://localhost:8080/ramki-gui-2l68k is prefixed
Its working all resources except websockify

Screenshot from 2024-02-01 13-29-07

but websockify resource SUBFOLDER not used
Screenshot from 2024-02-01 13-26-14

Its try to access ws://localhost:8080/websockify URL

Expected Behavior

I am expecting http://localhost:8080/ramki-gui-2l68k/websockify will be used

Steps To Reproduce

  1. Run following code
    docker run --rm -it --security-opt seccomp=unconfined --shm-size="1gb" -e PASSWORD=ramki -e SUBFOLDER=/ramki-gui-2l68k/ -p 8080:3000 lscr.io/linuxserver/webtop:ubuntu-kde

  2. Access http://localhost:8080/ramki-gui-2l68k/ url
    its working but websockify is not following SUBFOLDER context path prefix, so when i added another reverse proxy in front of this docker image or i want to run more docker Webtop images like http://localhost:8080/docker1,http://localhost:8080/docker2, http://localhost:8080/docker3, etc...
    Its not working

  3. Check the URL of all resource, except websockify all urls are following SUBFOLDER value

Environment

- OS:Ubuntu 22.04
- How docker service was installed: apt install

Docker creation

docker run --rm -it --security-opt seccomp=unconfined --shm-size="1gb" -e PASSWORD=ramki -e SUBFOLDER=/ramki-gui-2l68k/  -p 8080:3000 lscr.io/linuxserver/webtop:ubuntu-kde

Container logs

[migrations] started
[migrations] no migrations found
usermod: no changes
───────────────────────────────────────

      ██╗     ███████╗██╗ ██████╗ 
      ██║     ██╔════╝██║██╔═══██╗
      ██║     ███████╗██║██║   ██║
      ██║     ╚════██║██║██║   ██║
      ███████╗███████║██║╚██████╔╝
      ╚══════╝╚══════╝╚═╝ ╚═════╝ 

   Brought to you by linuxserver.io
───────────────────────────────────────

To support LSIO projects visit:
https://www.linuxserver.io/donate/

───────────────────────────────────────
GID/UID
───────────────────────────────────────

User UID:    911
User GID:    911
───────────────────────────────────────

...+...+..+.+........+.+.....+...+.+.........+........+...+.......+.....+.......+............+...+..+......+.............+..+...+.+..............+.........+......+.+......+..+...+.........+.+..............+.+..+.......+.....+...+.+.....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.....................+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.................+..............+......+......+........................+......+..........+..+.......+........+..................+.........+.........+.+.........+.....+......+.+........+.+......+............+.....+.+.........+.....+......+.+......+...+..............+......+......+.............+..+...+...+.........+.+...+.....................+...+..+...+......+....+.....+.+..+.......+...+........+............+...+.+.....+......+....+...+......+.........+..+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
......+...+.+.....+...+.+......+......+.....+....+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*.+.+...+.....+......+.+........+......+......+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++*........+..........+.........+........+....+...........+...+.+......+..............+....+......+...+........+...+....+..+....+..+...+....+.................+.........+.......+..+.+...........+...+.......+..........................+...+.+...........+...+....+...+..+.......+...+..+...+...+...+.+.........+......+......+........+.........+..........+..+.+..+...+...+......................+.........+..............+....+...+.....+.......+.....+......+.+........+...+...+.......+..+..........+...............+..+.+.....+.............+.........+...+...+...............+......+......+..+.+.................+...............+...+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
-----
[custom-init] No custom files found, skipping...
_XSERVTransmkdir: ERROR: euid != 0,directory /tmp/.X11-unix will not be created.

Xvnc KasmVNC 1.2.0 - built Jan  3 2024 23:13:49
Copyright (C) 1999-2018 KasmVNC Team and many others (see README.me)
See http://kasmweb.com for information on KasmVNC.
Underlying X server release 12014000, The X.Org Foundation

[ls.io-init] done.
 2024-02-01 08:12:52,848 [INFO] websocket 0: got client connection from 127.0.0.1
 2024-02-01 08:12:52,955 [PRIO] Connections: accepted: @172.17.0.1_1706775172.849630::websocket
Copy link

github-actions bot commented Feb 1, 2024

Thanks for opening your first issue here! Be sure to follow the relevant issue templates, or risk having this issue marked as invalid.

@thelamer
Copy link
Member

thelamer commented Feb 4, 2024

I cannot replicate this:

docker run --rm -it --security-opt seccomp=unconfined --shm-size="1gb" -e PASSWORD=ramki -e SUBFOLDER=/ramki-gui-2l68k/  -p 8080:3000 lscr.io/linuxserver/webtop:ubuntu-kde

example

Try a private window? Also make sure you are actually running that command the one posted in your bash example is not the same it has -e SUBFOLDER=ramki-gui-2l68k

@ramkicse
Copy link
Author

ramkicse commented Feb 5, 2024

@thelamer i updated the command which u point out

the URL http://localhost:8080/ramki-gui-2l68k/ is working
but when u observe via developer tools, websockify is loaded from ws://localhost:8080/websockify
I am expecting it should load from ws://localhost:8080/ramki-gui-2l68k/websockify

due to this, I can't host multiple container under a single domain name

i

@thelamer
Copy link
Member

thelamer commented Feb 5, 2024

Ahh yes I remember this linuxserver/docker-calibre#129 (comment)

I always recommend using a subdomain but if you are forced to use a subfolder then this is your only current solution.
The SUBFOLDER environment variable is actually there to preserve some backwards compatibility with the old base which was xrdp and guacamole.

@thelamer thelamer transferred this issue from linuxserver/docker-baseimage-kasmvnc Feb 14, 2024
@thelamer
Copy link
Member

This has been added to all the base images and I manually built ubuntu-kde.
Please test and confirm.
It will take time to waterfall to all other images over the next couple days.

@homerr homerr closed this as completed Apr 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Issues
Development

No branches or pull requests

3 participants