logo
Apache Lounge
Webmasters

 


About

Forum Index Downloads Search Register Log in  RSS Apache Lounge
 


Keep Server Online

If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.

or

Bitcoin

A donation makes a contribution towards the costs, the time and effort that's going in this site and building.

Thank You! Steffen

Apache Lounge is not sponsored.

Your donations will help to keep this site alive and well, and continuing building binaries.



mod_wsgi other user

 
Post new topic   Reply to topic    Apache Forum Index -> Apache third-party Modules



View previous topic :: View next topic  
Author Message
ThomasT



Joined: 05 Sep 2018
Posts: 6
Location: Germany

PostPosted: Tue 16 Oct '18 19:22    Post subject: mod_wsgi other user Reply with quote

Hi,

how can run the python script under a different user than apache?

I tried:

WSGIDaemonProcess ThomasApp user=thomas
WSGIScriptAlias /ThomasApp /usr/local/apache2/python/handler.py

but it still runs under user apache.

Additionally how can I set LD_LIBRARY_PATH so that handler.py can use some shared libs (*.so). E.g. those from Webshere MQ when using pymqi. Commandline and python shell works.

Thomas
Back to top
ThomasT



Joined: 05 Sep 2018
Posts: 6
Location: Germany

PostPosted: Thu 18 Oct '18 12:27    Post subject: Reply with quote

I found the solution:

In wsgi.conf

WSGIDaemonProcess MyApp user=thomas
WSGIProcessGroup MyApp

MyApp is a simply a name.
Back to top
James Blond
Moderator


Joined: 19 Jan 2006
Posts: 6477
Location: Germany, Next to Hamburg

PostPosted: Thu 18 Oct '18 16:28    Post subject: Reply with quote

Thanks for sharing
Back to top


Post new topic   Reply to topic    Apache Forum Index -> Apache third-party Modules
Page 1 of 1