devilbox icon indicating copy to clipboard operation
devilbox copied to clipboard

[Bug]: Virtual Hosts panel show commented out backend configuration

Open Ernestopheles opened this issue 3 years ago • 2 comments

Have you already looked into this bug?

  • [X] I have checked the Troubleshooting Guide
  • [X] I have checked Release notes for potential migration steps
  • [X] I have checked existing issues for similar bugs
  • [X] I have googled this bug already with no luck
  • [ ] I have not done any of the above

(Optional) Error message

No response

What went wrong?

Panel displays

tcp://php74:9000

in the Backend column

although the config-entry has been commented out

Expected behaviour

Panel displays

default

in the Backend column

How can we reproduce the bug?

Add to project folder: .devilbox/backend.cfg with entry ;conf:phpfpm:tcp:php74:9000

Restart devilbox

Host Operating System

Linux

Host Platform (amd64, arm64, other)

amd64

(Linux only) Is SELinux enabled?

No, SELinux is disabled

Docker version

#948

Docker Compose version

#948

Devilbox version

#948

Have you removed stopped containers before starting?

Yes

Have you pulled latest Docker images before starting?

Yes

Devilbox start command

#948

Config: .env file

#948

Config: docker-compose.override.yml

No response

Config: ./check-config.sh

#948

Log: docker-compose logs

#948

(Optional) Additional information

No response

Ernestopheles avatar Jan 10 '23 20:01 Ernestopheles

Hey, don't know how active is this or if its being worked upon. Tried to take a look as it seemed something rather simple. This change (currently only in my fork) changes the visual accordingly. It says default if the line is commented out and it says the set backend if its not.

How ever, when i tried testing with phpinfo(); the php used is not changing. I suspect that this should be fixed somewhere in this bash script.

I ain't too fluent in the devilbox's inner workings so it will take me some time to test this out and see what should be done. Will update again in case I manage to solve the issue.

userwiths avatar May 24 '23 10:05 userwiths

Ok, i did test this locally now. And i can say that i was just wrong when i said PHP is not changing.

PHP change is working correctly you just need to reload from C&C (Command & Control) tab or restart the containers. When you have commented out the backend.cfg you will see something like [WARN] [second.loc] Backend rewrite config is invalid: Invalid backend string ';conf:phpfpm:tcp:php81:9000'. It must start with 'conf:' In the C&C tab messages, and because it fails to process the backend.cfg it uses the default one. The issue is just visual.

Don't know the exact etiquette so I'm tagging @cytopia and leaving a PR with only the relevant changes.

userwiths avatar May 24 '23 11:05 userwiths