Install mod_wsgi Apache python

Alles, was den Apache betrifft, kann hier besprochen werden.

Install mod_wsgi Apache python

Postby ReasyEasyPeasy » 16. January 2016 18:33

Hey guys,
I try since hours to run python on my Webserver but it dont work. I have got
    Centos 7
installed. I did the following things:
created wsgi.conf in /etc/httpd/conf.d/wsgi.conf
Code: Select all
WSGIScriptAlias /wsgi /var/www/html/python/

created in /var/www/html/python/
Code: Select all
def application(environ,start_response):
    status = '200 OK'
    html = '<html>\n' \
           '<body>\n' \
           '<div style="width: 100%; font-size: 40px; font-weight: bold; text-align: center;">\n' \
           'mod_wsgi Test Page\n' \
           '</div>\n' \
           '</body>\n' \
    response_header = [('Content-type','text/html')]
    return [html]

restarted apache.
When I call the site I only get the plain code.
[Sat Jan 16 15:25:53.649441 2016] [core:notice] [pid 13746] SELinux policy enabled; httpd running as context system_u:system_r:httpd_t:s0
[Sat Jan 16 15:25:53.673587 2016] [suexec:notice] [pid 13746] AH01232: suEXEC mechanism enabled (wrapper: /usr/sbin/suexec)
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using localhost.localdomain. Set the 'ServerName' di$
[Sat Jan 16 15:25:53.715855 2016] [auth_digest:notice] [pid 13746] AH01757: generating secret for digest authentication ...
[Sat Jan 16 15:25:53.716527 2016] [lbmethod_heartbeat:notice] [pid 13746] AH02282: No slotmem from mod_heartmonitor
[Sat Jan 16 15:25:53.748104 2016] [mpm_prefork:notice] [pid 13746] AH00163: Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips mod_fcgid/2.3.9 mod_w$
[Sat Jan 16 15:25:53.748174 2016] [core:notice] [pid 13746] AH00094: Command line: '/usr/sbin/httpd -D FOREGROUND'

Please help me!
My english is bad! :(
Posts: 1
Joined: 16. January 2016 18:29
Operating System: CentOS 7

Return to Apache

Who is online

Users browsing this forum: No registered users and 9 guests