0

So I have ubuntu with docker-compose instance on oracle cloud

  1. container nginx proxy manager
version: "3"
services:
  app:
    image: 'jc21/nginx-proxy-manager:latest'
    restart: unless-stopped
    ports:
      - '80:80' # Public HTTP Port
      - '443:443' # Public HTTPS Port
      - '81:81' # Admin Web Port
    environment:
      DISABLE_IPV6: 'true'
    volumes:
      - ./data:/data
      - ./letsencrypt:/etc/letsencrypt

2nd container website

version: '3'
services:
  app:
    image: 'nginx:latest'
    restart: unless-stopped
    ports:
      - '91:80'
    volumes:
      - ./data:/usr/share/nginx/html

sudo iptables -L INPUT -n --line-numbers Chain INPUT (policy ACCEPT) num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED 2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 udp spt:123 5 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22 6 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

nothing heavy! If go by domain its showing "502 Bad Gateway", but by ip:91 its working fine somebody have experience how to solve?

i no have idea what need to do

Thank you for you time!

  • you need to provide more info as a general rule the more clear info you provide the more likely u r to get help. U r mapping port 91 on the host to port 80 in docker, is the domain request coning from the internet on port 91? in this case you will need a Internet Gateway in your VN, sec list or nsg entries for port 91 and also IP INPUT table rules for port 91, what is the output of 'sudo iptables -L INPUT -n --line-numbers' ? you will need to see something like "ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:91" – Nigel Savage Nov 29 '22 at 21:13
  • Oh sorry Nigel. – Ruslan Issayev Dec 03 '22 at 16:31
  • your rule line 3 "ACCEPT all -- 0.0.0.0/0 0.0.0.0/0" should let the packets thru on 91, now you should make sure your VN and sec lists and or nsg have an internet gateway and the corresponding rules for port 91, by the way the line 3 is not really a good idea – Nigel Savage Dec 04 '22 at 10:59

0 Answers0