📜 ⬆️ ⬇️

uWSGI includes full PHP support.

uWSGI logo

Today there was a good news that from now on uWSGI server supports PHP. No, at the level of GGI he supported before, but this does not go to any comparison with support at the kernel level of the uWSGI itself.

uWSGI

For those who for some reason have not yet used this convenient and stable server - a brief reference.

uWSGI is a fast, convenient and, at the same time, reliable WSGI server.
PHP plugin build

Download the php source, bind the uwsgi source to them and configure the PHP environment:
')
 ln -s /usr/src/uwsgi/plugins/php /usr/src/php/sapi/uwsgi ./buildconf --force ./configure --prefix=/opt/php --with-mysql --with-uwsgi=/usr/src/uwsgi 

Then build PHP with the traditional make, make install .

Use with Nginx

In the engineering, the processing of php requests is described by the usual section (for connecting with WSGI applications via uWSGI):

 location ~ .php$ { include uwsgi_params; uwsgi_modifier1 14; uwsgi_pass 127.0.0.1:3030; } 

Run uWSGI

While PHP support (as a plugin) is in alpha state , no plugin configuration is required. And you can start the server in its use mode as follows:

 uwsgi --plugins php --master --socket :3030 --processes 4 

At this rate, you can soon abandon not only Apache, but also all FastCGI-php-fpm combined.

Related Links

Run PHP scripts in uWSGI: projects.unbit.it/uwsgi/wiki/PHP
Read more about Harakiri mode in WiKi: projects.unbit.it/uwsgi/wiki

Source: https://habr.com/ru/post/134987/


All Articles