I’ve developed a Django project running on dev server. Now I am struggling in using Apache as the web server to run this project.
I’ve changed the port (say, 8088) at Router, and also edited http.conf in Apache dir to listen this port 8088.
Now I can view apache page at http://XX.XX.XX.XX:8088 (using ip) which shows ‘It works’..
however, when I tried to run Django project using ‘python manage.py runserver 0.0.0.0:8088‘, it says ‘ERROR 10013: An attempt was made to access a socket in a way forbidden by its access permissons‘.
It seems that the connection between Django and Apache doesn’t work out, since I can view Apache working page but I can’t get the project page…
I did configurate mod_wsgi.
maybe there are other silly stuff I’ve mistakenly done.
if anybody has some advice, that would be much appreciated!
If you’ve configured mod_wsgi properly, you don’t need to run
python manage.py runserver. Simply running the Apache daemon will make it listen on the port configured and will make it use the mod_wsgi file you’ve defined in the site-available.Re-read this Django – how to use Django with Apache and mod_wsgi to verify you have it set up appropriately. You cannot run
python manage.py runserveron a port that is already being listened to by Apache. Hence, the error attempting to access a socket (on port 8088) in a forbidden way.