Wednesday, August 30, 2017

HTTP Error 403 - Forbidden occurs

I have Django App
Using Django 1.9, Apache 2.4.6
Hosted on HTTPS
Certificate is : Multi Domain Certificate: *.customer.mydomain.com

I am facing the Issue of HTTP Error 403 - Forbidden , The Web server is configured to not list contents of this directory or you do not have enough permission to access the resource.

My .conf file is:

Listen 80
NameVirtualHost *:80
<VirtualHost *:80>
Redirect permanent / https://xxx.xx.mydomain.com
</VirtualHost>
Listen 443
NameVirtualHost *:443
<VirtualHost *:443>
    ServerName xxx.xx.mydomain.com:443
    SSLEngine on
    SSLCertificateKeyFile /etc/apache2/ssl/private.key
    SSLCertificateFile /etc/apache2/ssl/star.xx.mydomain.com.crt
    SSLCertificateChainFile /etc/apache2/ssl/intermediates.ca-bundle
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown
        Alias /static /opt/myproject/myproject/media
         <Directory /opt/myproject/>
        <Files wsgi.py>
                Order allow,deny
                Allow from all
                 Require all granted
        </Files>
        </Directory>

   WSGIDaemonProcess processgroupname python-path=/opt/myproject:/opt/virtualenv/lib/python2.7/site-packages
   WSGIProcessGroup processgroupname
   WSGIScriptAlias / /opt/myproject/myproject/wsgi.py
   WSGIPassAuthorization On
</VirtualHost>
Listen 8080
NameVirtualHost *:8080
<VirtualHost *:8080>
        Alias /static /opt/myproject/myproject/media
         <Directory /opt/myproject/myproject/>
        <Files wsgi.py>
                Order allow,deny
                Allow from all
                 Require all granted
        </Files>
        </Directory>

   WSGIDaemonProcess processname python-path=/opt/myproject:/opt/virtualenv/lib/python2.7/site-packages
   WSGIProcessGroup processname
   WSGIScriptAlias / /opt/myproject/myproject/wsgi.py
   WSGIPassAuthorization On
</VirtualHost>

Do any one has idea or solution on this issue

--
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/CAP%3DkbM2fQ7VC4Ygtn-62CTrKF73xX45j47eYVepZjb_%2BP7dBOg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment