From ArchWiki
Revision as of 20:53, 29 March 2013 by Dalvenjia (talk | contribs) (Running nginx jailed: new section)
Jump to: navigation, search

Run FastCGI as user, not root.

After reading this, why isn't the example in this wiki set to use the "http" user instead of root.

In step 3 for PHP

the folder /srv/http/nginx does not exist. It should be /usr/share/nginx/http shouldn't it?

systemd fails to start php-fpm with settings in this article

systemd gave error "Failed to get D-Bus connection". To fix, change the following in /etc/php/php-fpm.conf :

;error_log = log/php-fpm.log


error_log = /var/log/php-fpm.log

Not sure if this is confirmed, but seems to be common. Source: Installing Nginx With PHP5

Does anybody with wikiskills want to make the changes? I am new to wiki editing.

Check Help:Editing and Help:Style, it is a good opportunity to get involved. -- Fengchao (talk) 05:54, 20 March 2013 (UTC)

Running nginx jailed

Wouldn't be better to use systemd's RootDirectory= User= & Group= Options in the [Service] section instead of running each Exec* with chroot?

Description=A high performance web server and a reverse proxy server

ExecStartPre=/usr/sbin/nginx -t -q -g 'pid /run/; daemon on; master_process on;'
ExecStart=/usr/sbin/nginx -g 'pid /run/; daemon on; master_process on;'
ExecReload=/usr/sbin/nginx -g 'pid /run/; daemon on; master_process on;' -s reload
ExecStop=/usr/sbin/nginx -g 'pid /run/;' -s quit


Also Jail's /tmp and /run tmpfs should be added to fstab for the service to load on reboot.