logo
Apache Lounge
Webmasters

 

About Forum Index Downloads Search Register Log in RSS X


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

Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
Post new topic   Forum Index -> Third-party Modules View previous topic :: View next topic
Reply to topic   Topic: mod_wsgi other user
Author
ThomasT



Joined: 05 Sep 2018
Posts: 8
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: 8
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: 7294
Location: Germany, Next to Hamburg

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

Thanks for sharing
Back to top


Reply to topic   Topic: mod_wsgi other user View previous topic :: View next topic
Post new topic   Forum Index -> Third-party Modules