-
-
Notifications
You must be signed in to change notification settings - Fork 656
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
[Bug]: reverse proxy - 502 Bad Gateway nginx/1.21.6 - NodeJS #912
Comments
You get the "bad gateway" message when trying to reach the Devilbox GUI or a specific site? |
Are you able to open up the vhosts.php page? |
|
Yes |
Can you dump the vhost configuration here. Maybe there is something wrong with the override. You find it on the vhosts.php page |
Nginx Reverse Proxy Template defintion for vhost-gen.pyThe 'feature' section contains optional features that can be enabled viaconf.yml and will then be replaced into the main vhost ('structure' section)into their corresponding position:XDOMAIN_REQALIASESDENIESSTATUSThe features itself also contain variables to be adjusted in conf.ymland will then be replaced in their corresponding feature sectionbefore being replaced into the vhost section (if enabled):XDomain:REGEXAlias:REGEXPATHDeny:REGEXStatus:REGEXVariables to be replaced directly in the vhost configuration can also be setin conf.yml and include:VHOST_NAMEDOCUMENT_ROOTINDEXACCESS_LOGERROR_LOGBasic vHost skeletonvhost: |
REDIRECT vHost Type (normal or reverse proxy)vhost_type: Optional features to be enabled in vHostfeatures: SSL Configurationssl: | Redirect to SSL directiveredirect: | PHP-FPM left empty, as we are an reverse proxy configurationphp_fpm: "" alias: | deny: | server_status: | xdomain_request: | |
Can you reproduce the bug? |
Any new information? |
Or anyone else? Am I the only one with this problem? |
in the Devilbox, can you do the following and provide the output?
|
Thx for reply/help. In PHP Container: (right?) |
@frankroc2022 Which port is your service running? Maybe run the service and then run the curl command. |
Port 4000 like described in the example: curl: (7) Failed to connect to php port 4000: Connection refused @vikas5914 It works for you? |
@frankroc2022 The port should be where your Nodejs is running. If it's running on 8080 or 8000, you need to use that. |
Thx, here was my mistake: NODE_PROJECTS=( to |
@frankroc2022 if it's fixed, I suggest you close the issue. |
This has now been automated: #942 |
Have you already looked into this bug?
(Optional) Error message
502 Bad Gateway nginx/1.21.6
What went wrong?
502 Bad Gateway nginx/1.21.6
Expected behaviour
Hello World to read.
How can we reproduce the bug?
Install Devilbox under Ubutu 22.04 setup auto dns and ssl and follow https://devilbox.readthedocs.io/en/latest/examples/setup-reverse-proxy-nodejs.html
I changed
NODE_PROJECTS=(
"/shared/httpd/my-node/js/index.js"
)
to
NODE_PROJECTS=(
"/shared/httpd/my-node/index.js"
)
Host Operating System
Linux
Host Platform (amd64, arm64, other)
amd64
(Linux only) Is SELinux enabled?
No, SELinux is disabled
Docker version
Docker version 20.10.12, build 20.10.12-0ubuntu4
Docker Compose version
docker-compose version 1.29.2, build unknown
Devilbox version
Devilbox v2.2.0 (2022-04-14)
Have you removed stopped containers before starting?
Yes
Have you pulled latest Docker images before starting?
Yes
Devilbox start command
docker-compose up httpd php bind
Config: .env file
Config: docker-compose.override.yml
No response
Config: ./check-config.sh
Log: docker-compose logs
(Optional) Additional information
No response
The text was updated successfully, but these errors were encountered: