Forbidden fix

35 views
Skip to first unread message

Mike Dewhirst

unread,
Oct 13, 2016, 3:47:58 AM10/13/16
to Django users
I have two similar servers behaving differently. This is the staging
server ...

You don't have permission to access /substance/wsds/7291/ on this server.

The production server is fine running Ubuntu 14.04 and Apache 2.2. The
difference is that I have just upgraded staging to Ubuntu 16.04 and
Apache 2.4.

The new problem resulting from the upgrade was that the Apache redirect
from http on port 80 to https on port 443 was failing occasionally.

That occasion was in the Django Admin when clicking (View on site)

The fix is to adjust get_absolute_url() so it always specifies https

Hope this helps someone.

Cheers

Mike






Ricardo Prado

unread,
Oct 13, 2016, 9:39:46 PM10/13/16
to Django users
Can You send an image or log about this problem?


Check virtualhost,
APACHE 2.2 - use in dir "Allow All"
APACHE 2.4 - use "Require All Grant"

Ricardo Prado

unread,
Oct 14, 2016, 3:58:23 PM10/14/16
to Django users
Hi Mike!

Are you using SSL certificate?
What's your SO? Ubuntu, Debian, Win?
Please get apache log, you can found this in typing:

cat /etc/var/log/apache2/error.log (if ubuntu or debian)

and type this an copy and past the permission:

stat -c "%n %a" /substance/wsds/7291

check in octal permissions,

I'm waiting you reply



Em quinta-feira, 13 de outubro de 2016 04:47:58 UTC-3, Mike Dewhirst escreveu:
Reply all
Reply to author
Forward
0 new messages