User Tools

Site Tools


Sidebar

php-uwsgi

Supervisor Conf

cat > /etc/supervisor/conf.d/phpenv.conf <<EOF
[program:phpenv]
command = /usr/bin/docker run --rm --name phpenv -v /etc/php:/etc/php -v /etc/msmtp:/etc/msmtp -v /var/run/mysqld:/run/mysqld -v /var/www:/var/www --net=host felixonmars/archlinux uwsgi -s 127.0.0.1:3030 -b 32768 --plugin php -M -p 40 --cheaper 4 --uid 33 --gid 33 --php-sapi-name=apache --disable-logging
stopsignal = QUIT
EOF

Check sample MSMTP configuration to enable sendmail().

Nginx Integration

cat > /etc/nginx/conf.d/php.conf <<EOF
upstream php {
    server 127.0.0.1:3030;
}
EOF

Then in each PHP site:

    location ~ \.php?$ {
        include uwsgi_params;
        uwsgi_modifier1 14;
        uwsgi_pass php;
    }
php-uwsgi.txt · Last modified: 2017/01/06 02:50 by felixonmars