Adding common proxy_pass to another container on server and getting this error (in title). Found some issues, but it seems they doesn’t help me. :( Backend is on 8080 port netstat -plant
tcp 0 0 127.0.0.53:53 0.0.0.0:* LISTEN 528/systemd-resolve
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 681/sshd: /usr/sbin
tcp 0 0 138.68.24.18:22 112.85.42.67:55747 ESTABLISHED 108245/sshd: root [
tcp 0 0 138.68.24.18:22 5.19.1.53:2686 ESTABLISHED 106286/sshd: root@p
tcp 0 340 138.68.24.18:22 5.19.1.53:2604 ESTABLISHED 108038/sshd: root@p
tcp 0 0 138.68.24.18:22 5.19.1.53:2471 ESTABLISHED 105166/sshd: root@p
tcp6 0 0 :::80 :::* LISTEN 107898/docker-proxy
tcp6 0 0 :::8080 :::* LISTEN 93312/docker-proxy
tcp6 0 0 :::22 :::* LISTEN 681/sshd: /usr/sbin
tcp6 0 0 :::443 :::* LISTEN 107887/docker-proxy
tcp6 0 0 :::8000 :::* LISTEN 1232/docker-proxy
tcp6 0 0 :::9000 :::* LISTEN 1220/docker-proxy
Nginx config
server {
listen 443 ssl http2;
listen [::]:443 ssl http2;
server_name hiddendomain.com www.hiddendomain.com;
root /var/www/hiddendomain.com/public;
# SSL
ssl_certificate /etc/nginx/ssl/hiddendomain.com.crt;
ssl_certificate_key /etc/nginx/ssl/hiddendomain.com.key;
# security
include nginxconfig.io/security.conf;
# index.html fallback
location / {
try_files $uri $uri/ /index.html =400;
}
location /api {
proxy_pass http://0.0.0.0:8080/;
}
# additional config
include nginxconfig.io/general.conf;
}
# HTTP redirect
server {
listen 80;
listen [::]:80;
server_name .hiddendomain.com;
return 301 https://hiddendomain.com$request_uri;
}
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there @usapharmacydashboard,
It looks like there might be something wrong with the container itself. I would recommend checking your Docker container logs to see if there are any errors in there which could point you to the right direction.
To check the logs of the container, first find your container ID:
docker ps -a
And then use the following command:
docker logs container_id
On another note, what I could suggest is setting your proxy_pass rule to http://127.0.0.1:8080/ rather than 0.0.0.0.
You can also take a look at this quick video with some tips on how to troubleshoot that kind of errors:
Regards, Bobby
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.