Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #92667 > unrolled thread
| Started by | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| First post | 2015-06-16 19:23 +1000 |
| Last post | 2015-06-17 11:00 -0600 |
| Articles | 5 — 4 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2015-06-16 19:23 +1000
Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden Chris Warrick <kwpolska@gmail.com> - 2015-06-16 20:10 +0200
Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden Chris Warrick <kwpolska@gmail.com> - 2015-06-16 20:19 +0200
Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden Chris Angelico <rosuav@gmail.com> - 2015-06-17 09:58 +1000
Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden Michael Torrie <torriem@gmail.com> - 2015-06-17 11:00 -0600
| From | Steven D'Aprano <steve+comp.lang.python@pearwood.info> |
|---|---|
| Date | 2015-06-16 19:23 +1000 |
| Subject | Re: Trying to configure Apache and Python 2.7 on Red Hat I get 403 Forbidden |
| Message-ID | <557feaf7$0$1655$c3e8da3$5496439d@news.astraweb.com> |
On Tuesday 16 June 2015 13:31, Néstor Boscán wrote: > Tried it and I keep having the same error. Isn't there a log file where I > can check what is causing this? Probably. Have you googled for "selinux log file"? We're not experts on SELinux, this is a Python mailing list, not a specialist SELinux one, so most of us here would have to google for information of SELinux in order to answer. What happens if you try to just download the python file instead of run it? Do you still get a 404? If so, that proves it's not a Python issue, it's something to do with Apache, file permissions, or SELinux. -- Steve
[toc] | [next] | [standalone]
| From | Chris Warrick <kwpolska@gmail.com> |
|---|---|
| Date | 2015-06-16 20:10 +0200 |
| Message-ID | <mailman.521.1434478233.13271.python-list@python.org> |
| In reply to | #92667 |
On Tue, Jun 16, 2015 at 12:11 PM, Néstor Boscán <nestorjb@gmail.com> wrote: > I disabled selinux completely and the page worked. So, selinux was the problem (which is typical, it’s a really dumb piece of software) The command to disable enforcing temporarily is actually "setenforce 0". Though you would need to issue it on every restart if you did not change the config file. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16
[toc] | [prev] | [next] | [standalone]
| From | Chris Warrick <kwpolska@gmail.com> |
|---|---|
| Date | 2015-06-16 20:19 +0200 |
| Message-ID | <mailman.523.1434478783.13271.python-list@python.org> |
| In reply to | #92667 |
On Tue, Jun 16, 2015 at 8:14 PM, Néstor Boscán <nestorjb@gmail.com> wrote: > I tried that but it didn't work. > > I had to change /etc/selinux/config and reboot to make it work. It would be > nice if the wsgi module generated some log that explains why you get the > 403. There are several posibilities. Well, that’s not wsgi’s fault. There was a “permission denied” error, that’s everything wsgi ever knew. As a RHEL sysadmin, you should know that this is most likely caused by braindead syslinux and to read the audit log. PS. please don’t top-post. -- Chris Warrick <https://chriswarrick.com/> PGP: 5EAAEA16
[toc] | [prev] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2015-06-17 09:58 +1000 |
| Message-ID | <mailman.529.1434499102.13271.python-list@python.org> |
| In reply to | #92667 |
On Wed, Jun 17, 2015 at 4:22 AM, Néstor Boscán <nestorjb@gmail.com> wrote: >> On Tue, Jun 16, 2015 at 8:14 PM, Néstor Boscán <nestorjb@gmail.com> wrote: >> > I tried that but it didn't work. >> > >> > I had to change /etc/selinux/config and reboot to make it work. It >> > would be >> > nice if the wsgi module generated some log that explains why you get the >> > 403. There are several posibilities. >> >> Well, that’s not wsgi’s fault. There was a “permission denied” error, >> that’s everything wsgi ever knew. >> As a RHEL sysadmin, you should know that this is most likely caused by >> braindead syslinux and to read the audit log. > > > Yes but it could log which os file was it trying to access. If you want to know what a program was doing when it got some error, the obvious sledgehammer to reach for is strace. Cutting the situation down to size so you can actually find what you want in strace's output, now, that's a whole new problem. But the information will be there. You want a log? Be careful what you wish for, you might get one that spews more text than python-list does :) ChrisA
[toc] | [prev] | [next] | [standalone]
| From | Michael Torrie <torriem@gmail.com> |
|---|---|
| Date | 2015-06-17 11:00 -0600 |
| Message-ID | <mailman.560.1434560462.13271.python-list@python.org> |
| In reply to | #92667 |
On 06/16/2015 12:19 PM, Chris Warrick wrote: > On Tue, Jun 16, 2015 at 8:14 PM, Néstor Boscán <nestorjb@gmail.com> wrote: >> I tried that but it didn't work. >> >> I had to change /etc/selinux/config and reboot to make it work. It would be >> nice if the wsgi module generated some log that explains why you get the >> 403. There are several posibilities. > > Well, that’s not wsgi’s fault. There was a “permission denied” error, > that’s everything wsgi ever knew. > As a RHEL sysadmin, you should know that this is most likely caused by > braindead syslinux and to read the audit log. The officially-blessed software collections has a version of python2.7 that should work fine with selinux, and it comes with a mod_wsgi module that will plug it into the stock apache. https://www.softwarecollections.org/en/scls/rhscl/python27/ https://rhn.redhat.com/errata/RHBA-2014-0610.html I think the package is called python27-mod_wsgi
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web