I am currently trying to install mod_wsgi in python by following steps in this page https://github.com/GrahamDumpleton/mod_wsgi (seems to be the official page).
After installing with pip install mod_wsgi
, I type command mod_wsgi-express start-server
to check if it runs.
It seems not running and I have an error :
root@vpsxxxx:/# mod_wsgi-express start-server
Server URL : http://localhost:8000/
Server Root : /tmp/mod_wsgi-localhost:8000:0
Server Conf : /tmp/mod_wsgi-localhost:8000:0/httpd.conf
Error Log : /tmp/mod_wsgi-localhost:8000:0/error_log
AH00534: apache2: Configuration error: More than one MPM loaded.
As you can see, I am root, but I have the same error If I do mod_wsgi-express start-server wsgi.py --port=80 --user www-data --group www-data
.
Any idea ?
Edit : Maybe there's a problem during installation:
/usr/include/python2.7/object.h:822:38: warning: the comparison will always evaluate as ‘false’ for the address of ‘_Py_NoneStruct’ will never be NULL [-Waddress]
root@vpsxxxx:~# pip install mod_wsgi
Downloading/unpacking mod-wsgi
Downloading mod_wsgi-4.2.1.tar.gz (1.1MB): 1.1MB downloaded
Running setup.py (path:/tmp/pip_build_root/mod-wsgi/setup.py) egg_info for package mod-wsgi
Downloading/unpacking mod-wsgi-metrics>=1.0.0 (from mod-wsgi)
Downloading mod_wsgi-metrics-1.0.0.tar.gz
Running setup.py (path:/tmp/pip_build_root/mod-wsgi-metrics/setup.py) egg_info for package mod-wsgi-metrics
Installing collected packages: mod-wsgi, mod-wsgi-metrics
Running setup.py install for mod-wsgi
building 'mod_wsgi.server.mod_wsgi-py27' extension
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_daemon.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_daemon.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_stream.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_stream.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_apache.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_apache.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/mod_wsgi.c -o build/temp.linux-x86_64-2.7/src/server/mod_wsgi.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
In file included from /usr/include/python2.7/Python.h:80:0,
from src/server/wsgi_python.h:24,
from src/server/mod_wsgi.c:22:
src/server/mod_wsgi.c: In function ‘Dispatch_ssl_var_lookup’:
/usr/include/python2.7/object.h:822:38: warning: the comparison will always evaluate as ‘false’ for the address of ‘_Py_NoneStruct’ will never be NULL [-Waddress]
#define Py_XINCREF(op) do { if ((op) == NULL) ; else Py_INCREF(op); } while (0)
^
src/server/mod_wsgi.c:5555:9: note: in expansion of macro ‘Py_XINCREF’
Py_XINCREF(Py_None);
^
/usr/include/python2.7/object.h:822:38: warning: the comparison will always evaluate as ‘false’ for the address of ‘_Py_NoneStruct’ will never be NULL [-Waddress]
#define Py_XINCREF(op) do { if ((op) == NULL) ; else Py_INCREF(op); } while (0)
^
src/server/mod_wsgi.c:5564:9: note: in expansion of macro ‘Py_XINCREF’
Py_XINCREF(Py_None);
^
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_logger.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_logger.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_convert.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_convert.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_metrics.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_metrics.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_restrict.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_restrict.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_server.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_server.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_validate.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_validate.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_interp.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_interp.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
x86_64-linux-gnu-gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/apache2 -I/usr/include/python2.7 -c src/server/wsgi_buckets.c -o build/temp.linux-x86_64-2.7/src/server/wsgi_buckets.o -I/usr/include/apache2 -I. -I/usr/include/apr-1.0 -I/usr/include -D_FORTIFY_SOURCE=2 -DLINUX -D_REENTRANT -D_GNU_SOURCE -pipe -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security -pthread
src/server/wsgi_buckets.c: In function ‘wsgi_python_bucket_setaside’:
src/server/wsgi_buckets.c:151:5: warning: format ‘%lld’ expects argument of type ‘long long int’, but argument 3 has type ‘apr_off_t’ [-Wformat=]
fprintf(stderr, "start=%lld\n", b->start);
^
x86_64-linux-gnu-gcc -pthread -shared -Wl,-O1 -Wl,-Bsymbolic-functions -Wl,-Bsymbolic-functions -Wl,-z,relro -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -D_FORTIFY_SOURCE=2 -g -fstack-protector --param=ssp-buffer-size=4 -Wformat -Werror=format-security build/temp.linux-x86_64-2.7/src/server/wsgi_daemon.o build/temp.linux-x86_64-2.7/src/server/wsgi_stream.o build/temp.linux-x86_64-2.7/src/server/wsgi_apache.o build/temp.linux-x86_64-2.7/src/server/mod_wsgi.o build/temp.linux-x86_64-2.7/src/server/wsgi_logger.o build/temp.linux-x86_64-2.7/src/server/wsgi_convert.o build/temp.linux-x86_64-2.7/src/server/wsgi_metrics.o build/temp.linux-x86_64-2.7/src/server/wsgi_restrict.o build/temp.linux-x86_64-2.7/src/server/wsgi_server.o build/temp.linux-x86_64-2.7/src/server/wsgi_validate.o build/temp.linux-x86_64-2.7/src/server/wsgi_interp.o build/temp.linux-x86_64-2.7/src/server/wsgi_buckets.o -o build/lib.linux-x86_64-2.7/mod_wsgi/server/mod_wsgi-py27.so -L/usr/lib -L/usr/lib/python2.7/config -lpython2.7
Installing mod_wsgi-express script to /usr/local/bin
Running setup.py install for mod-wsgi-metrics
Successfully installed mod-wsgi mod-wsgi-metrics
Cleaning up...
Doom.