Nginx Mastery | Static Files | Multiple Domain | Local DNS configuration

Поделиться
HTML-код
  • Опубликовано: 4 дек 2024

Комментарии • 21

  • @liorbm1
    @liorbm1 2 года назад +10

    you could also change your hosts file

    • @ronald418
      @ronald418 11 месяцев назад

      And save yourself a lot of work.

    • @LryuzakiLN
      @LryuzakiLN 7 месяцев назад

      How to do that?

  • @forestandnaturetherapy
    @forestandnaturetherapy Год назад +1

    Whoohoo! Thank you :D

  • @shaheerzaman620
    @shaheerzaman620 Год назад +1

    cool stuff!

  • @soroushamirhashchi7142
    @soroushamirhashchi7142 2 года назад +1

    Thank you.

  • @div7624
    @div7624 Год назад +2

    Couldn't you just modify the /etc/resolv.conf of the containers to use your dns container, rather than change your host system's DNS resolver? I'm not sure if this would work or not but it would interesting if it did.

  • @njmsaikat
    @njmsaikat 2 года назад +4

    I'm getting error, it;s saying port number 80 and 53 both already in use. running on ubuntu and there's a apache2 server already running on my local machine, not on docker. I changed the port number in container for dns to 54 and nginx back to 8000 in docker-compose file. Then it started running but when i run nslookup command , it couldn't find the server. can you give me some suggestion, please.

    • @jamshid_dev
      @jamshid_dev 2 года назад +1

      mee too the same .... it's said similar error ... port 53 already in use. Maybe apache2 server is uses port 80 on your localhost, therefore you can stop it by "sudo service nginx stop" or "systemctl nginx.service stop" commands. unfortunately, I don't know which which service is uses port 53 on your localhost

    • @pascalkarisa6934
      @pascalkarisa6934 2 года назад

      For those experiencing the same error and using Ubuntu. Do the following after running docker compose build:
      sudo systemctl stop systemd-resolved
      sudo systemctl disable systemd-resolved
      After that then run:
      docker compose up
      Will work.
      NB. You will not be able to access the internet thus later you'll have to rollback the above commands by running :
      sudo systemctl enable systemd-resolved
      sudo systemctl start systemd-resolved
      Thanks.

  • @jamshid_dev
    @jamshid_dev 2 года назад +1

    thanks bro 👍

  • @etiennerobert6462
    @etiennerobert6462 2 года назад

    Thank you. How to serve pdf files and images with Nginx but only to users that have permission on those files and are logged in on my Django website ?

    • @veryacademy
      @veryacademy  2 года назад +1

      There are a few different options. Have a read through the link below. Thanks for the tutorial suggestion!
      stackoverflow.com/questions/28166784/restricting-access-to-private-file-downloads-in-django

    • @etiennerobert6462
      @etiennerobert6462 2 года назад

      @@veryacademy Thanks for the link. I like the last guy's idea response['X-Accel-Redirect'] = path_to_file. I wonder if it works. Also, I suppose it Nginx would serve both Django website and serve all static files plus the user private files. Would be a nice tutorial indeed.

  • @jamshid_dev
    @jamshid_dev 2 года назад +1

    first comment 🤛

  • @олегтарасов-э4ф
    @олегтарасов-э4ф 2 месяца назад +1

    at the point where dns stuff started i dropped out

  • @Micha-vl5qm
    @Micha-vl5qm 2 года назад

    29:09

  • @protektwar
    @protektwar 10 месяцев назад +1

    22 min could be skipped...

  • @random5107
    @random5107 Месяц назад

    Calling bind as dhcp server just shows the lack of understanding the technology you use. Bind is a dns server, a very old project, and one of the most popular even today. Hope it's just a simple confusion. BTW, no need run compose build and the start, just start it and it's gonna do everything in sequence. Also, using bind and docker is an overkill, as you could use hosts file to mock site names. And finally docker is not needed, everything can be run on the host. In case you need a clean environment lxc could be a much better option.

  • @hakimdz3358
    @hakimdz3358 2 года назад +1

    plz i have probleme in django help me :(

    • @veryacademy
      @veryacademy  2 года назад

      Sorry I can’t help this time, you get it sorted?