HTTP Error 403 - Forbidden occurs

45 views
Skip to first unread message

deepak gupta

unread,
Aug 30, 2017, 3:11:28 AM8/30/17
to django...@googlegroups.com
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

Antonis Christofides

unread,
Aug 30, 2017, 4:34:00 AM8/30/17
to django...@googlegroups.com, deepak gupta

Hi,

Sometimes the Apache log file (something like /var/log/apache2/error.log, but it may be /var/log/apache2/yourdomain-error.log) has an additional error message that may help you track down the problem.

Regards,

Antonis

Antonis Christofides
http://djangodeployment.com
--
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...@googlegroups.com.
To post to this group, send email to django...@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.

Reply all
Reply to author
Forward
0 new messages