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

how is webproc used for nginx in docker container #6

Open
wanglixiang90 opened this issue Apr 9, 2018 · 6 comments
Open

how is webproc used for nginx in docker container #6

wanglixiang90 opened this issue Apr 9, 2018 · 6 comments

Comments

@wanglixiang90
Copy link

I'm try to use webproc to manager nginx and nginx.conf in docker container ,but it's not work well , and nginx listen port don't work in container ,so get this requests.

@THernandez03
Copy link

Same issue here, but instead of using nginx, im using Traefik as a proxy.

I exposed the port 8080 and enter with the IP 127.0.0.1 it works, but using the proxy shows the webproc page with no connection.

image

@kebertxela
Copy link

kebertxela commented Mar 23, 2019

@THernandez03 I am also using Traefik and had odd problems with a few things including browser caching and non exposed ports- I added this line to the end of the Dockerfile

EXPOSE 53/udp 8080/tcp

and I'm getting a proper display now

  dnsmasq:
    build:
      context: jpillora/docker-dnsmasq
    container_name: dnsmasq
    ports:
     - 53:53/udp
    restart: always
    volumes:
     - ./dnsmasq.conf:/etc/dnsmasq.conf
     - ./tftpboot:/tftproot
    cap_add:
     - NET_ADMIN
    labels:
      - "traefik.enable=true"
      - "traefik.port=8080"
      - "traefik.backend=dnsmasq"
      - "traefik.frontend.rule=Host:dnsmasq.example.com"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.frameDeny=true"

@THernandez03
Copy link

THernandez03 commented Mar 23, 2019

@THernandez03 I am also using Traefik and had odd problems with a few things including browser caching and non exposed ports- I added this line to the end of the Dockerfile

EXPOSE 53/udp 8080/tcp

and I'm getting a proper display now

  dnsmasq:
    build:
      context: jpillora/docker-dnsmasq
    container_name: dnsmasq
    ports:
     - 53:53/udp
    restart: always
    volumes:
     - ./dnsmasq.conf:/etc/dnsmasq.conf
     - ./tftpboot:/tftproot
    cap_add:
     - NET_ADMIN
    labels:
      - "traefik.enable=true"
      - "traefik.port=8080"
      - "traefik.backend=dnsmasq"
      - "traefik.frontend.rule=Host:dnsmasq.example.com"
      - "traefik.frontend.headers.SSLRedirect=true"
      - "traefik.frontend.headers.STSSeconds=315360000"
      - "traefik.frontend.headers.browserXSSFilter=true"
      - "traefik.frontend.headers.contentTypeNosniff=true"
      - "traefik.frontend.headers.forceSTSHeader=true"
      - "traefik.frontend.headers.STSIncludeSubdomains=true"
      - "traefik.frontend.headers.STSPreload=true"
      - "traefik.frontend.headers.frameDeny=true"

For some reason i didn't work for me... i don't know what i'm missing.

This is my docker-compose

  dns:
    container_name: dns
    build: ./containers/dns
    restart: on-failure
    networks:
      - main
    ports:
      - 53:53/udp
    env_file:
      - ./.env.docker
    labels:
      - traefik.enable=true
      - traefik.port=8080
      - traefik.backend=dns
      - traefik.frontend.rule=Host:dns.dev.example.com
      - traefik.frontend.headers.SSLRedirect=true
      - traefik.frontend.headers.STSSeconds=315360000
      - traefik.frontend.headers.browserXSSFilter=true
      - traefik.frontend.headers.contentTypeNosniff=true
      - traefik.frontend.headers.forceSTSHeader=true
      - traefik.frontend.headers.STSIncludeSubdomains=true
      - traefik.frontend.headers.STSPreload=true
      - traefik.frontend.headers.frameDeny=true

and this is my Dockerfile

FROM jpillora/dnsmasq
COPY dnsmasq.conf /etc/dnsmasq.conf
EXPOSE 53/udp 8080/tcp

PD: i considered changing traefik.frontend.rule value

@Fifty-Nine
Copy link

I ran into this issue and based on this and this, I was able to get an nginx proxy working by adding the following directives to the proxy configuration:

chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header Connection keep-alive;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
keepalive_timeout 3600;

As indicated by the above links, this is an issue with how the default nginx proxy configuration handles server side events--I don't think it's an issue with webproc itself.

@vinanrra
Copy link

vinanrra commented Apr 8, 2020

I ran into this issue and based on this and this, I was able to get an nginx proxy working by adding the following directives to the proxy configuration:

chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header Connection keep-alive;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
keepalive_timeout 3600;

As indicated by the above links, this is an issue with how the default nginx proxy configuration handles server side events--I don't think it's an issue with webproc itself.

Can u share the file with whole information to be able to reverse proxy?

Just saw that u guys used traefik, im not using it :(

Thanks

@cs-network
Copy link

I ran into this issue and based on this and this, I was able to get an nginx proxy working by adding the following directives to the proxy configuration:

chunked_transfer_encoding off;
proxy_buffering off;
proxy_cache off;
proxy_set_header Connection keep-alive;
proxy_connect_timeout 3600;
proxy_send_timeout 3600;
proxy_read_timeout 3600;
keepalive_timeout 3600;

As indicated by the above links, this is an issue with how the default nginx proxy configuration handles server side events--I don't think it's an issue with webproc itself.

Can u share the file with whole information to be able to reverse proxy?

Just saw that u guys used traefik, im not using it :(

Thanks

Here is my section running like described above:

server {
    server_name dns.dev.local;

    listen 80;
    location / {
        proxy_set_header Host dns.dev.local;
        proxy_pass http://<ip>:<port>/;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        chunked_transfer_encoding off;
        proxy_buffering off;
        proxy_cache off;
        proxy_set_header Connection keep-alive;
        proxy_connect_timeout 3600;
        proxy_send_timeout 3600;
        proxy_read_timeout 3600;
        keepalive_timeout 3600;
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants