Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71994
| Path | csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!news.roellig-ltd.de!open-news-network.org!cyclone01.ams2.highwinds-media.com!news.highwinds-media.com!voer-me.highwinds-media.com!npeersf04.am4!fx04.am4.POSTED!not-for-mail |
|---|---|
| From | alister <alister.nospam.ware@ntlworld.com> |
| Subject | Re: WSGI (was: Re: Python CGI) |
| Newsgroups | comp.lang.python |
| References | <btv115Fb0rlU1@mid.individual.net> <20140519205252.264fc764@bigbox.christie.dr> <mailman.10281.1401005873.18130.python-list@python.org> |
| User-Agent | Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 8bit |
| Lines | 42 |
| Message-ID | <pejgv.154404$hK2.6465@fx04.am4> (permalink) |
| NNTP-Posting-Host | 82.5.246.13 |
| X-Complaints-To | http://netreport.virginmedia.com |
| X-Trace | 1401012245 82.5.246.13 (Sun, 25 May 2014 10:04:05 UTC) |
| NNTP-Posting-Date | Sun, 25 May 2014 10:04:05 UTC |
| Organization | virginmedia.com |
| Date | Sun, 25 May 2014 10:04:05 GMT |
| X-Received-Body-CRC | 3206444044 |
| X-Received-Bytes | 2259 |
| Xref | csiph.com comp.lang.python:71994 |
Show key headers only | View raw
On Sun, 25 May 2014 09:06:18 +0200, Chris wrote:
> On 05/20/2014 03:52 AM, Tim Chase wrote:
>> While Burak addressed your (Fast-)CGI issues, once you have a
>> test-script successfully giving you output, you can use the
>> standard-library's getpass.getuser() function to tell who your script
>> is running as.
>
> LoadModule wsgi_module modules/mod_wsgi.so AddHandler wsgi-script .wsgi
> WSGIDaemonProcess myproj user=chris threads=3
>
> [root@t-centos1 ~]# ps -ef|grep chris chris 1201 1199 0 08:47 ?
> 00:00:00 /usr/sbin/httpd
>
> -------------------------------------------------------8<-------
> #!/usr/bin/python import getpass def application(environ,
> start_response):
> status = '200 OK'
> output = 'Hello World!'
> output += getpass.getuser()
> response_headers = [('Content-type', 'text/plain'),
> ('Content-Length', str(len(output)))]
> start_response(status, response_headers)
>
> return [output]
> ------------------------------------------------------->8-------
>
> Hello World!root
>
> Hmm, why is it root?
>
> I'm using Apache and mod_userdir. Can I define WSGIDaemonProcess for
> each user?
>
> - Chris
is your apache server running as root?
if so it probably should be corrected
--
Why is it taking so long for her to bring out all the good in you?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Python CGI Christian <chris_news@arcor.de> - 2014-05-19 20:32 +0200
Re: Python CGI Burak Arslan <burak.arslan@arskom.com.tr> - 2014-05-19 21:53 +0300
Re: Python CGI Tim Chase <python.list@tim.thechases.com> - 2014-05-19 20:52 -0500
WSGI (was: Re: Python CGI) Christian <chris_news@arcor.de> - 2014-05-25 09:01 +0200
WSGI (was: Re: Python CGI) Chris <ch2009@arcor.de> - 2014-05-25 09:06 +0200
Re: WSGI (was: Re: Python CGI) alister <alister.nospam.ware@ntlworld.com> - 2014-05-25 10:04 +0000
Re: WSGI Chris <ch2009@arcor.de> - 2014-05-25 14:22 +0200
csiph-web