• Members 4 posts
    Jan. 16, 2021, 6:39 p.m.

    First of all the docker works great and I commend your work! Sorry for my noob question.
    I've been having issues trying to run apache server along side the nginx docker. It looks like I need to run a reverse proxy to get them to work together. It seems like misago docker already has nginx reverse proxy, correct? Is it possible to change the setup so that it can provide a reverse proxy for apache with SSL support?
    Or would it be easier to ditch apache and run my other site in a nginx docker as well? How would I go about doing that? Thanks

  • Jan. 17, 2021, 12:45 a.m.

    Hi!

    Two ideas come to mind:

    • Run your site inside Misago's docker
    • Run Misago's docker (and NGINX) behind your Apache.

    The latter seems easiest to accomplish. In misago-docker you can create new file named docker-compose.override.yml to override ports used by Misago's docker:

    version: "3.0"
    services:
      nginx-proxy:
        ports:
          - "8000:80"
          - "8001:443"
    

    After docker-compose restart NGINX will listen on port 8000 for HTTP and 8001 for HTTPS. You can setup forwarding in Apache then.

  • Members 4 posts
    Jan. 18, 2021, 12:48 a.m.

    Thanks for the help. I got an error when I restarted the docker. Looks like it's still trying to access port 443?
    This only happens when apache is already running. If apache is off, then I'm able to start the docker normally. But then I can't start apache because the docker is already using the ports.

    Host is already in use by another container

    ERROR: for misago_docker_nginx-proxy_1 Cannot start service nginx-proxy: driver failed programming external connectivity on endpoint misago_docker_nginx-proxy_1 (80d8a040eddca68ca35eb491928c851031a711a5badc3e24cc8f8b0762fb9a66): Error starStarting misago_docker_postgres_1 ... done
    Recreating misago_docker_misago-celery_1 ... done

    ERROR: for nginx-proxy Cannot start service nginx-proxy: driver failed programming external connectivity on endpoint misago_docker_nginx-proxy_1 (80d8a040eddca68ca35eb491928c851031a711a5badc3e24cc8f8b0762fb9a66): Error starting userland proxy: listen tcp4 0.0.0.0:443: bind: address already in use

  • Members 4 posts
    Jan. 18, 2021, 8:24 p.m.

    I tried various settings in apache but I'm still getting this error. I think it's the nginx docker, but I'm not sure. It's interesting how it only gives the error message for port 443, not 80.

  • Jan. 19, 2021, 9:56 p.m.

    Humm, maybe it should be 443:8001. Or maybe port 8001 is already taken on your machine? Can you say if netstat -pna | grep 8001 returns any apps already listening on 8001?

  • Members 4 posts
    Jan. 20, 2021, 12:16 a.m.

    With '443:8001' I get an error message even with apache stopped. Won't work at all. It gives a similar error message except the last block is slightly different:
    ERROR: for nginx-proxy Cannot start service nginx-proxy: driver failed programming external connectivity on endpoint misago_docker_nginx-proxy_1 (326dd88b1ef82931e8b3d5c622229fecef5099b13f15cac3aac055762cf643dd): Bind for 0.0.0.0:443 failed: port is already allocated
    ERROR: Encountered errors while bringing up the project.

    Also netstat didn't return anything, the 8001 port is free.

  • Members 2 posts
    March 6, 2021, 1:49 p.m.

    Hello, Did you find any solution? Thanks