https://wiki.archlinux.org/api.php?action=feedcontributions&user=Dalvenjia&feedformat=atomArchWiki - User contributions [en]2024-03-29T14:53:55ZUser contributionsMediaWiki 1.41.0https://wiki.archlinux.org/index.php?title=Talk:Nginx&diff=252301Talk:Nginx2013-03-29T20:53:04Z<p>Dalvenjia: /* Running nginx jailed */ new section</p>
<hr />
<div>== Run FastCGI as user, not root. ==<br />
<br />
After reading [http://library.linode.com/lemp-guides/ubuntu-10.04-lucid/#deploy_php_with_fastcgi this], why isn't the example in this wiki set to use the "http" user instead of root.<br />
<br />
== In step 3 for PHP ==<br />
the folder /srv/http/nginx does not exist. It should be /usr/share/nginx/http shouldn't it?<br />
<br />
== systemd fails to start php-fpm with settings in this article ==<br />
<br />
systemd gave error "Failed to get D-Bus connection". To fix, change the following in /etc/php/php-fpm.conf :<br />
<br />
;error_log = log/php-fpm.log<br />
to<br />
error_log = /var/log/php-fpm.log<br />
<br />
Not sure if this is confirmed, but seems to be common. Source: [http://www.howtoforge.com/installing-nginx-with-php5-and-php-fpm-and-mysql-support-on-opensuse-12.1 Installing Nginx With PHP5]<br />
<br />
Does anybody with wikiskills want to make the changes? I am new to wiki editing.<br />
: Check [[Help:Editing]] and [[Help:Style]], it is a good opportunity to get involved. -- [[User:Fengchao|Fengchao]] ([[User talk:Fengchao|talk]]) 05:54, 20 March 2013 (UTC)<br />
<br />
== Running nginx jailed ==<br />
<br />
Wouldn't be better to use systemd's {{ic|RootDirectory&#61;}} {{ic|User&#61;}} & {{ic|Group&#61;}} Options in the {{ic|[Service]}} section instead of running each {{ic|Exec*}} with {{ic|chroot}}?<br />
<br />
{{hc|/etc/sistemd/system/nginx.service|<br />
[Unit]<br />
Description&#61;A high performance web server and a reverse proxy server<br />
After&#61;syslog.target network.target<br />
<br />
[Service]<br />
Type&#61;forking<br />
RootDirectory&#61;/srv/http<br />
User&#61;http<br />
Group&#61;http<br />
PIDFile&#61;/run/nginx.pid<br />
ExecStartPre&#61;/usr/sbin/nginx -t -q -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecStart&#61;/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;'<br />
ExecReload&#61;/usr/sbin/nginx -g 'pid /run/nginx.pid; daemon on; master_process on;' -s reload<br />
ExecStop&#61;/usr/sbin/nginx -g 'pid /run/nginx.pid;' -s quit<br />
<br />
[Install]<br />
WantedBy&#61;multi-user.target}}<br />
<br />
Also Jail's {{ic|/tmp}} and {{ic|/run}} tmpfs should be added to fstab for the service to load on reboot.</div>Dalvenjia