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.
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.
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
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.
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
@@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.
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.
you could also change your hosts file
And save yourself a lot of work.
How to do that?
Whoohoo! Thank you :D
cool stuff!
Thank you.
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.
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.
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
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.
thanks bro 👍
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 ?
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
@@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.
first comment 🤛
at the point where dns stuff started i dropped out
29:09
22 min could be skipped...
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.
plz i have probleme in django help me :(
Sorry I can’t help this time, you get it sorted?