Monday, January 28, 2019

Django, mod_wsgi and apache2.4 = 403 forbidden

I'm sorry if I'm asking the repetitive but i really need assistance I been trying to setup a server for my company system but I had no progress. 

As the tile subject mention the I'm Using Mod_wsgi 4.6.5 and Apache 2.4

for my Django is 2.1 and python 3.7

When try to run on my local machine I get 403 and I did many google search and the only answer I get is add in Require all granted which I had already add in. you could see below for particle section for my Apache http

LoadModule wsgi_module "C:\users\user\appdata\local\programs\python\python37\lib\site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd"
WSGIScriptAlias / "C:\Frontier_Website\FrounterWebApp\FrounterWeb\wsgi.py"\
WSGIPythonPath "C:\Frontier_Website\FrounterWebApp\zigview"
WSGIPythonHome "C:\Users\user\AppData\Local\Programs\Python\Python37"

<Directory C:\Frontier_Website\FrounterWebApp\zigview\static>
Require all granted
</Directory>

<Directory C:\Frontier_Website\FrounterWebApp\FronterWeb>
<Files wsgi.py>
Require all granted
</Files>
</Directory>


for more detail you can look at at code in stackoverflow.com:
 
https://stackoverflow.com/questions/54249683/django-mod-wsgi-and-apache2-4-problems
  
I had try to run the system in virtualenv but I get no result as well and when I try to start the server, I get this error: The system cannot find the path specified.
The virtualenv code is below;

#python and mod_wsgi setting 
<VirtualHost *:86>
 ServerName Localhost.com 
 DocumentRoot C:\Frontier_Website\FATWebsite\FrontierWebApp\zigview\templates\FrounterWeb
LoadModule wsgi_module C:\users\user\appdata\local\programs\python\python37\lib\site-packages/mod_wsgi/server/mod_wsgi.cp37-win_amd64.pyd
WSGIScriptAlias / C:\Frontier_Website\FATWebsite\FrontierWebApp\FrounterWeb\wsgi.py
WSGIPythonHome C:\Frontier_Website\FATWebsite\Lib
WSGIPythonPath C:\Frontier_Website\FrounterWebApp\zigview

Alias /static \Frontier_Website\FATWebsite\FrounterWebApp\zigview\static
<Directory C:\Frontier_Website\FATWebsite\FrounterWebApp\zigview\static>
Require all granted
</Directory>

<Directory C:\Frontier_Website\FATWebsite\FrounterWebApp\FronterWeb\wsgi-script>
<Files wsgi.py>
   Require all granted
</Files>

</Directory>
</VirtualHost> 
 
Please help I had been trying to solve this problem for month now

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c95e4fd6-bf77-4da9-8745-39f36c97b38b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment