目次
文書の過去の版を表示しています。
uWSGI - WSGI アプリケーションコンテナ
uWSGI は、「ホスティングサービスを構築するためのフルスタックの開発を的とする」ソフトウェアアプリケーションです。プロジェクトでサポートされている最初のプラグインである Web Server Gateway Interface(WSGI; ウィズギー) にちなんで命名されている。
uWSGIは、Cherokee や Nginx などの Web サーバーと組み合わせて Python Web アプリケーションを提供するためによく使用され、uWSGI のネイティブ uwsgi プロトコルを直接サポートする。
uWSGI - Wikipedia より
本家: The uWSGI project — uWSGI 2.0 documentation
ソースコード: GitHub - unbit/uwsgi: uWSGI application server container
Apache 2.4 への mod_uwsgi.so のインストール
$ sudo dnf install httpd-devel $ sudo -s
# cd ~ # curl -O https://raw.githubusercontent.com/unbit/uwsgi/master/apache2/mod_uwsgi.c % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 22715 100 22715 0 0 60251 0 --:--:-- --:--:-- --:--:-- 60251
# apxs -i -a -c mod_uwsgi.c /usr/lib64/apr-1/build/libtool --silent --mode=compile gcc -prefer-pic -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -Wp,-D_GLIBCXX_ASSERTIONS -fexceptions -fstack-protector-strong -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -DLINUX -D_REENTRANT -D_GNU_SOURCE -pthread -I/usr/include/httpd -I/usr/include/apr-1 -I/usr/include/apr-1 -c -o mod_uwsgi.lo mod_uwsgi.c && touch mod_uwsgi.slo mod_uwsgi.c: 関数 ‘uwsgi_handler’ 内: mod_uwsgi.c:572:7: 警告: 真偽値として使われる代入のまわりでは、丸括弧の使用をお勧めします [-Wparentheses] 572 | if (hret = ap_scan_script_header_err_brigade(r, bb, NULL)) { | ^~~~ mod_uwsgi.c: 関数 ‘cmd_uwsgi_force_wsgi_scheme’ 内: mod_uwsgi.c:601:21: 警告: ‘&’ の被演算子内にある比較の周りに小括弧を付けることを推奨します [-Wparentheses] 601 | if (strlen(scheme) < 9 & strlen(scheme) > 0) { | ~~~~~~~~~~~~~~~^~~ mod_uwsgi.c: 関数 ‘cmd_uwsgi_max_vars’ 内: mod_uwsgi.c:614:13: 警告: 使用されない変数 ‘val’ です [-Wunused-variable] 614 | int val ; | ^~~ mod_uwsgi.c: 関数 ‘cmd_uwsgi_socket2’ 内: mod_uwsgi.c:705:6: 警告: 真偽値として使われる代入のまわりでは、丸括弧の使用をお勧めします [-Wparentheses] 705 | if (tcp_port = strchr(path, ':')) { | ^~~~~~~~ mod_uwsgi.c: 関数 ‘cmd_uwsgi_socket’ 内: mod_uwsgi.c:738:6: 警告: 真偽値として使われる代入のまわりでは、丸括弧の使用をお勧めします [-Wparentheses] 738 | if (tcp_port = strchr(path, ':')) { | ^~~~~~~~ /usr/lib64/apr-1/build/libtool --silent --mode=link gcc -Wl,-z,relro,-z,now -o mod_uwsgi.la -rpath /usr/lib64/httpd/modules -module -avoid-version mod_uwsgi.lo /usr/lib64/httpd/build/instdso.sh SH_LIBTOOL='/usr/lib64/apr-1/build/libtool' mod_uwsgi.la /usr/lib64/httpd/modules /usr/lib64/apr-1/build/libtool --mode=install install mod_uwsgi.la /usr/lib64/httpd/modules/ libtool: install: install .libs/mod_uwsgi.so /usr/lib64/httpd/modules/mod_uwsgi.so libtool: install: install .libs/mod_uwsgi.lai /usr/lib64/httpd/modules/mod_uwsgi.la libtool: install: install .libs/mod_uwsgi.a /usr/lib64/httpd/modules/mod_uwsgi.a libtool: install: chmod 644 /usr/lib64/httpd/modules/mod_uwsgi.a libtool: install: ranlib /usr/lib64/httpd/modules/mod_uwsgi.a libtool: finish: PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/sbin" ldconfig -n /usr/lib64/httpd/modules ---------------------------------------------------------------------- Libraries have been installed in: /usr/lib64/httpd/modules If you ever happen to want to link against installed libraries in a given directory, LIBDIR, you must either use libtool, and specify the full pathname of the library, or use the '-LLIBDIR' flag during linking and do at least one of the following: - add LIBDIR to the 'LD_LIBRARY_PATH' environment variable during execution - add LIBDIR to the 'LD_RUN_PATH' environment variable during linking - use the '-Wl,-rpath -Wl,LIBDIR' linker flag - have your system administrator add LIBDIR to '/etc/ld.so.conf' See any operating system documentation about shared libraries for more information, such as the ld(1) and ld.so(8) manual pages. ---------------------------------------------------------------------- chmod 755 /usr/lib64/httpd/modules/mod_uwsgi.so
# chmod 755 /usr/lib64/httpd/modules/mod_uwsgi.so # vi /etc/httpd/conf/httpd.conf
- /etc/httpd/conf/httpd.conf
# # Dynamic Shared Object (DSO) Support # # To be able to use the functionality of a module which was built as a DSO you # have to place corresponding `LoadModule' lines at this location so the # directives contained in it are actually available _before_ they are used. # Statically compiled modules (those listed by `httpd -l') do not need # to be loaded here. # # Example: # LoadModule foo_module modules/mod_foo.so # LoadModule uwsgi_module modules/mod_uwsgi.so Include conf.modules.d/*.conf