Secure-Compliance-Solutions-LLC / GVM-Docker

Greenbone Vulnerability Management Docker Image with OpenVAS
https://securecompliance.gitbook.io/projects/
MIT License
247 stars 91 forks source link

Running behind nginx proxy #63

Closed srekkas closed 4 years ago

srekkas commented 4 years ago

I am running containers behind Nginx-Proxy container. whic automagicaly proxy to 443 or 80 ports. How to change default 9392 port to other so container. Maiby possible to expose 443 or 80 port so Nginx Proxy container can proxy connection to container.

pixelsquared commented 4 years ago

If you are referring to this: https://github.com/nginx-proxy/nginx-proxy

Then you can add a environment variable on the GVM container to tell the proxy what port to use.

Try adding this to your GVM container:

--env VIRTUAL_PORT=9392
srekkas commented 4 years ago

Yes, i am refering to this container.

Tried 9392 and 8080 virtual ports. Dont work, Tried

expose:

Dont't work too

My docker-compose file

_version: "2.2"

services: gvm: image: securecompliance/gvm restart: always environment:

volumes: gvm-data:

networks: default: driver: bridge nginxproxydefault: external: true

vesch commented 4 years ago

OpenVAS by default uses HTTPS. Here is what makes nginx-proxy to work for us:

...
environment:
  - VIRTUAL_HOST=gvm.domain.tld
  - VIRTUAL_PROTO=https
ports:
  - 9392
...
srekkas commented 4 years ago

OpenVAS by default uses HTTPS. Here is what makes nginx-proxy to work for us:

...
environment:
  - VIRTUAL_HOST=gvm.domain.tld
  - VIRTUAL_PROTO=https
ports:
  - 9392
...

Thanks, that works :)