Simplify nginx systemd unit and add RuntimeDirectory option to php
This commit is contained in:
@ -1,3 +1,4 @@
|
|||||||
|
daemon on;
|
||||||
user www-data;
|
user www-data;
|
||||||
worker_processes auto;
|
worker_processes auto;
|
||||||
pid /run/nginx.pid;
|
pid /run/nginx.pid;
|
||||||
|
@ -9,11 +9,10 @@ LimitNOFILE=100000
|
|||||||
TimeoutStartSec=600
|
TimeoutStartSec=600
|
||||||
TimeoutStopSec=5
|
TimeoutStopSec=5
|
||||||
KillMode=mixed
|
KillMode=mixed
|
||||||
ExecStop=-/sbin/start-stop-daemon --quiet --stop --pidfile /run/nginx.pid
|
ExecStop=/usr/sbin/nginx -s stop
|
||||||
ExecStartPre=/usr/bin/install -Z -m 02755 -o www-data -g www-data -d /run/nginx
|
ExecStartPre=/usr/sbin/nginx -t -q
|
||||||
ExecStartPre=/usr/sbin/nginx -t -q -g 'daemon on; master_process on;'
|
ExecStart=/usr/sbin/nginx
|
||||||
ExecStart=/usr/sbin/nginx -g 'daemon on; master_process on;'
|
ExecReload=/usr/sbin/nginx -s reload
|
||||||
ExecReload=/usr/sbin/nginx -g 'daemon on; master_process on;' -s reload
|
|
||||||
ProtectSystem=strict
|
ProtectSystem=strict
|
||||||
PrivateTmp=true
|
PrivateTmp=true
|
||||||
NoNewPrivileges=true
|
NoNewPrivileges=true
|
||||||
@ -28,6 +27,7 @@ ReadWritePaths=-/var/lib/nginx/
|
|||||||
ReadWritePaths=-/var/www/var/run/
|
ReadWritePaths=-/var/www/var/run/
|
||||||
ReadWritePaths=-/run/
|
ReadWritePaths=-/run/
|
||||||
InaccessiblePaths=-/root/
|
InaccessiblePaths=-/root/
|
||||||
|
RuntimeDirectory=nginx
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -29,6 +29,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -31,6 +31,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -29,6 +29,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -31,6 +31,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -29,6 +29,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -31,6 +31,7 @@ InaccessiblePaths=-/root/
|
|||||||
CPUQuota=100%
|
CPUQuota=100%
|
||||||
MemoryHigh=25%
|
MemoryHigh=25%
|
||||||
MemoryMax=35%
|
MemoryMax=35%
|
||||||
|
RuntimeDirectory=php
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Reference in New Issue
Block a user