17. Using an Nginx reverse proxy Docker container on a Raspberry Pi | Hosting a website for free

แชร์
ฝัง
  • เผยแพร่เมื่อ 15 ม.ค. 2025

ความคิดเห็น • 31

  • @Smackman82
    @Smackman82 3 ปีที่แล้ว +2

    awesome series so far! A lot of us are really doing well because of how well you're explaining things. However I do wanna add something to keep in mind for the other viewers - after every episode, use "docker-compose down" so everything gets unloaded to avoid the "port is already allocated" error

  • @nicholassmith6412
    @nicholassmith6412 3 ปีที่แล้ว

    everything is explained so well!

  • @peterhughes3648
    @peterhughes3648 4 ปีที่แล้ว +1

    I followed the instructions to the letter and it worked right up to the installation of NGINX. After that I could no longer connect to the website. It took me a while to work it out but the problem was that the folder ./etc/nginx did not exist / was not created, and therefore website.conf did not exist either. I created the file /etc/nginx/conf.d/website.conf and it works fine, although I am not sure that the instructions in the Dockerfile that are doing the delete and recopy are working either.

    • @09a51a1007
      @09a51a1007 4 ปีที่แล้ว +1

      Hi I'm having same issue... Is it resolved??

    • @peterreilly6252
      @peterreilly6252 4 ปีที่แล้ว +1

      @@09a51a1007 are you looking on the pi for this directory or in the nginx docker container? I dont think it should exist on the pi, but will in the container. I am sure there is a way to interact with the container to run unix commands and to check, but dont think its the objective of this tutorial.

    • @09a51a1007
      @09a51a1007 4 ปีที่แล้ว

      @@peterreilly6252 I'm looking at pi directory... After learning basics in docker I understand tx 😁😁

  • @mucklemoose
    @mucklemoose 4 ปีที่แล้ว +2

    Hello. Great series. Best I can find. I've been following closely, but have trouble with this video. Changing "wordpress_new" to "wordpress" caused an error which I only managed to get rid of with "docker-compose down --remove-orphans". Second, your port command for the wordpress container changed from "80:80" to "80", and I can't work out which it should be. Everything worked up to this video, *before* I added the nginx container, but after adding the nginx container to the yaml file I'm getting an error "Bind for 0.0.0.0:80 failed: port is already allocated", and I'm also getting "Found orphan containers (nginx) for this project". I'm using "docker-compose down", then "docker-compose build", then "docker-compose up -d". Any help would be appreciated. I can email the yaml file if you could give me your address By the way, next time please increase the font size of your terminal and editor.

    • @mucklemoose
      @mucklemoose 4 ปีที่แล้ว +2

      Finally got it working. I had a typo in the website.conf file ("proxy_pass:" instead of "proxy_pass", doh!). I kept the ports setting as "80" in the wordpress container. Thanks again for a great series.

  • @exchangetimes
    @exchangetimes 4 ปีที่แล้ว +1

    Brilliant thanks!

  • @cyclingsergio368
    @cyclingsergio368 4 ปีที่แล้ว +2

    Hi, great videos I'm having a great time setting things up and see them work......or have to fix them due to screw ups on my part, so far its been good the site is live and out.
    But I can not get the nginx portion to work and can not figure why for some reason nginx gives indication that is running but when I run the "ls" command it does not show as running when I check with "ls -a" it shows as "Exited" and it shows the same time as starting for the exiting times so I don't think it really never runs for any period of time.
    Any ideas where I could have gone in the wrong direction, any suggestions as what to do from here or should I just go back to video 17 and start over? or maybe delete the container and reinstall?
    Thank you in advance any guidance is greatly appreciated

    • @Singleentity101
      @Singleentity101  4 ปีที่แล้ว

      Hey Sergio,
      If nginx is exiting when started, this is very likely a result of a mis-configuration when you edit the config file. I suggest you retrace your steps. Or you can look at the Docker logs, I don't cover Docker logs in the video, but you can Google it, or if you want, you could become a patron and I'd be able to give you more focused support. I'm really glad you're finding it useful and enjoying it, its great to hear!

    • @cyclingsergio368
      @cyclingsergio368 4 ปีที่แล้ว

      @@Singleentity101 Thank you, I'll read into it and see if I can figure it out, I find your videos very educational will look into being able to support you, thanks again and keep it up.

    • @resocipher873
      @resocipher873 4 ปีที่แล้ว

      @@cyclingsergio368 Hello Sergio I am having the same issue were you able to figure out?

    • @cyclingsergio368
      @cyclingsergio368 4 ปีที่แล้ว

      @@resocipher873 yes I did figure it out, I think what I ended up doing was to shut down WordPress container during the setup for nginx because they are both trying to use port 80, I also believe I did configured nginx on the file to redirect the ports as you are supposed to do on a later video (I think on the yaml file so that not both services are trying to use the same port setup) it's been a while but that's what I remember doing, hope it helps se backup before you changes things just in case.

    • @curtispoirier
      @curtispoirier 4 ปีที่แล้ว

      @@cyclingsergio368 How did you manage to accomplish this?

  • @peterreilly6252
    @peterreilly6252 4 ปีที่แล้ว +1

    Hi thanks for this series, excellent! Howver somewhere between video 14 and video 17 the port parameters for the wordpress service in the yaml file changed from "80:80" to "80" this caused an issue for me accessing the website content. Is there an explanation please?

    • @Singleentity101
      @Singleentity101  4 ปีที่แล้ว

      Well spotted, they do. Yes I believe it was a mistake on my part for not being consistent. I don't think there are many thankfully, but this one is indeed a mistake.

    • @madladspades
      @madladspades 3 ปีที่แล้ว +1

      80:80 maps internal port 80 to external port 80. Basically telling wordpress to use traffic coming from external port 80. Now we are using nginx - so it will handle incoming traffic. We change the port to 80 only since it only need to use internal port 80 to communicate with nginx. Nginx now has to colons for 80:80 and 443:443 since it handles incoming traffic.

  • @dawid_dahl
    @dawid_dahl 4 ปีที่แล้ว

    Can’t you please the proxy_set_header Host $http_host anyway? Why is it important? Thanks for this super awesome series!

  • @Brianle180
    @Brianle180 3 ปีที่แล้ว

    Great content. There is a problem that when I type any search in wp page, it redirect to my internal raspberry pi IP address. So why do I have that problem?

    • @Brianle180
      @Brianle180 3 ปีที่แล้ว

      Howerver, I find it does not a ideal way to do that. Any other suggestions, can we config somehow in nginx instead of set server_name in docker-compose.yml?

  • @hermancorey
    @hermancorey 4 ปีที่แล้ว

    After conducting all of your steps, I can only get the wordpress website to come up with my public IP address. When using my domain, it says server IP address could not be found.

    • @Singleentity101
      @Singleentity101  4 ปีที่แล้ว

      Hi, this sounds very much like a DNS server issue, the DNS service is responsible for sorting out the addressing between public IP and domain. Or its a nameserver issue. Either one could lead to this problem. Did you follow the videos exactly (all of them to date)?

    • @hermancorey
      @hermancorey 4 ปีที่แล้ว

      Raspberry Pi Coding Yes sir I did. I covered it multiple times with the same results.

  • @jaywillis4063
    @jaywillis4063 4 ปีที่แล้ว

    How difficult would it be to add phpmyadmin to the .yaml file? Thanks for the videos!

  • @ahlm28
    @ahlm28 ปีที่แล้ว

    Great videos. NOTE: if you run into an issue like the one below. Remove from docker-compose.yaml the port mapping "80:80" to only 80 like this file services/wordpress/ports: "80"

  • @paolonervi2208
    @paolonervi2208 2 ปีที่แล้ว

    Super useful videos.just a couple of hints for the new videos:
    1.set a bigger character when you are typing, so It could be readable also on a smartphone.
    2. Set a higher audio volume level. In these videos Is too low and when the ads interrupt the video my ears are hurting.
    Thank you vert much
    Best regards fron Italy.
    Paolo.

  • @BYAZIT
    @BYAZIT 4 ปีที่แล้ว

    Anyone get success on this? I don't know what I am doing wrong. It's showing 502 error!

    • @resprite
      @resprite 3 ปีที่แล้ว

      Had this issue too but was fixed by running docker-compose up --build
      No idea if it'll work for you