FROM alpine:3.4RUN apk add --no-cache apache2-mod-wsgi && mkdir -p /run/apache2 && mkdir -p /wsgiADD wsgi-test.conf /etc/apache2/conf.d/ADD wsgi-test.wsgi /wsgi/CMD ["/bin/sh"]Listen 8080<VirtualHost *:8080> ServerName localhost WSGIScriptAlias /test /wsgi/wsgi-test.wsgi# WSGIDaemonProcess example.com processes=2 threads=2# WSGIProcessGroup example.com <Directory /wsgi> Require all granted </Directory></VirtualHost>def application(environ, start_response): status = '200 OK' output = 'Hello World!\n' response_headers = [('Content-type', 'text/plain'), ('Content-Length', str(len(output)))] start_response(status, response_headers) return [output]/ # httpd -DFOREGROUNDAH00558: httpd: Could not reliably determine the server's fully qualified domain name, using 172.17.0.5. Set the 'ServerName' directive globally to suppress this messageSegmentation faultapk --no-cache add build-base bash
pip install mod_wsgi-httpd
pip install mod_wsgi
addgroup -S apache
adduser -S -G apache apache
mod_wsgi-express start-server /wsgi/wsgi-test.wsgi --user apache --group apache
(gdb) rStarting program: /bin/bash -c mod_wsgi-express\ start-server\ /wsgi/wsgi-test.wsgi\ --user\ apache\ --group\ apacheprocess 1667 is executing new program: /usr/local/bin/python2.7Server URL : http://localhost:8000/Server Root : /tmp/mod_wsgi-localhost:8000:0Server Conf : /tmp/mod_wsgi-localhost:8000:0/httpd.confError Log File : /tmp/mod_wsgi-localhost:8000:0/error_log (warn)Request Capacity : 5 (1 process * 5 threads)Request Timeout : 60 (seconds)Startup Timeout : 15 (seconds)Queue Backlog : 100 (connections)Queue Timeout : 45 (seconds)Server Capacity : 20 (event/worker), 20 (prefork)Server Backlog : 500 (connections)Locale Setting : en_US.UTF-8process 1667 is executing new program: /bin/busyboxprocess 1667 is executing new program: /bin/bashprocess 1667 is executing new program: /usr/local/lib/python2.7/site-packages/mod_wsgi_packages/httpd/bin/httpd
Program received signal SIGSEGV, Segmentation fault.wsgi_add_daemon_process (cmd=0x7fffffffe800, mconfig=<optimized out>, args=0x55555583eefd "") at src/server/mod_wsgi.c:75697569 src/server/mod_wsgi.c: No such file or directory.(gdb) bt#0 wsgi_add_daemon_process (cmd=0x7fffffffe800, mconfig=<optimized out>, args=0x55555583eefd "") at src/server/mod_wsgi.c:7569#1 0x00005555555a2776 in invoke_cmd (cmd=0x7ffff567d8d0 <wsgi_commands+80>, parms=parms@entry=0x7fffffffe800, mconfig=0x555555839e38, args=0x55555583ecc8 "localhost:8000 display-name='(wsgi:localhost:8000:0)' home='/' threads=5 maximum-requests=0 python-path='' python-eggs='/tmp/mod_wsgi-localhost:8000:0/python-eggs' lang='en_US.UTF"...) at config.c:879#2 0x00005555555a4f1d in ap_walk_config_sub (section_vector=0x55555581e508, parms=0x7fffffffe800, current=0x55555583aa88) at config.c:1309#3 ap_walk_config (current=0x55555583aa88, parms=parms@entry=0x7fffffffe800, section_vector=0x55555581e508) at config.c:1342#4 0x00005555555a622d in ap_process_config_tree (s=<optimized out>, conftree=<optimized out>, p=0x5555557ec0a8, ptemp=<optimized out>) at config.c:2059#5 0x0000555555582d5d in main (argc=10, argv=0x7fffffffe9b8) at main.c:739 if (!strcmp(entry->name, name)) return "Name duplicates previous WSGI daemon definition.";Program received signal SIGSEGV, Segmentation fault.0x00007ffff7dc1abd in strcmp () from /lib/ld-musl-x86_64.so.1--
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 modwsgi+u...@googlegroups.com.
To post to this group, send email to mod...@googlegroups.com.
Visit this group at https://groups.google.com/group/modwsgi.
For more options, visit https://groups.google.com/d/optout.
[Fri Sep 30 07:18:19.019193 2016] [wsgi:error] [pid 19] [client 192.168.168.161:53243] No WSGI daemon process called 'example.com' has been configured: /wsgi/wsgi-test.wsgi
# mod_wsgi-express start-server test.wsgi --user apache --group apache --enable-gdbServer URL : http://localhost:8000/Server Root : /tmp/mod_wsgi-localhost:8000:0Server Conf : /tmp/mod_wsgi-localhost:8000:0/httpd.confError Log File : /tmp/mod_wsgi-localhost:8000:0/error_log (warn)Request Capacity : 5 (1 process * 5 threads)Request Timeout : 60 (seconds)Startup Timeout : 15 (seconds)Queue Backlog : 100 (connections)Queue Timeout : 45 (seconds)Server Capacity : 20 (event/worker), 20 (prefork)Server Backlog : 500 (connections)Locale Setting : en_US.UTF-8GNU gdb (GDB) 7.11Copyright (C) 2016 Free Software Foundation, Inc.License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>This is free software: you are free to change and redistribute it.There is NO WARRANTY, to the extent permitted by law. Type "show copying"and "show warranty" for details.This GDB was configured as "x86_64-alpine-linux-musl".Type "show configuration" for configuration details.For bug reporting instructions, please see:Find the GDB manual and other documentation resources online at:For help, type "help".Type "apropos word" to search for commands related to "word"...Reading symbols from /usr/local/lib/python2.7/site-packages/mod_wsgi_packages/httpd/bin/httpd...done.
Program received signal SIGSEGV, Segmentation fault.0x00007ffff5457f72 in wsgi_add_import_script (cmd=0x7fffffffe7a0, mconfig=<optimized out>, args=0x555555832492 "process-group='%{GLOBAL}' application-group=%{GLOBAL}") at src/server/mod_wsgi.c:49964996 src/server/mod_wsgi.c: No such file or directory.Listen 8080WSGIDaemonProcess example0verylongname processes=2 threads=2WSGIScriptAlias /test /wsgi/wsgi-test.wsgiWSGIProcessGroup example0verylongname<Directory /wsgi>Require all granted</Directory>Listen 8080WSGIDaemonProcess example.com processes=2 threads=2WSGIScriptAlias /test /wsgi/wsgi-test.wsgi