Hello,

 

I am running the following, with a clean install:

 

·        RHEL 7

·        Apache 2.4.6

·        mod_wsgi 4.5.15

·        Python 2.7.5

·        web.py 0.37

 

I have successfully deployed my web.py application via mod_wsgi and Apache, 
however, I am continuing to fight with an issue when I use the Python 
‘socket’ module inside of my code.  I identified that I am receiving the 
socket.error error code [Errno 13] Permission denied.  I tried running 
several scripts with socket itself and paramiko, and they both raise the 
same error.  Running another module that would communicate with another 
system inside the app, for example, ‘requests’, works just fine.  Running 
the app via the web.py built-in CherryPy server works fine.  Running the 
scripts via the Python interpreter works fine.

 

I am redirecting 80 to 443 in the httpd.conf so the ssl.conf contains the 
VirtualHost configuration.

 

I’ve set the following in /etc/httpd/conf/httpd.conf:

 

#Global

WSGISocketPrefix /var/run/httpd/wsgi

User apache

Group apache

 

I also tried /var/run/wsgi, but the results are the same.

 

Set the following WSGI directives in the VirtualHost in 
/etc/httpd/conf.d/ssl.conf:

 

#Inside VirtualHost

WSGIDaemonProcess example.com user=apache group=apache processes=2 
threads=15

WSGIProcessGroup example.com

 

Restarting Apache, I see the following file created in /var/run/httpd/wsgi 
(or /var/run/ previously):

srwx------.  1 apache root      0 Jul 11 18:02 wsgi.6619.0.1.sock

 

I still receive the [Errno 13] Permission denied when trying to run even a 
simple socket script inside my web.py application.  (<server_ip> redacted)


#simple socket script

s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)

server = (*<server_ip>*,22)

s.connect(server)

s.close()

 

Please let me know if anyone has any idea as to what may be occurring here.

 

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"modwsgi" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.

Reply via email to