summaryrefslogtreecommitdiff
path: root/package/nginx/files
diff options
context:
space:
mode:
authorWaldemar Brodkorb <wbx@openadk.org>2024-01-21 12:47:41 +0100
committerWaldemar Brodkorb <wbx@openadk.org>2024-01-21 12:47:41 +0100
commit6242087c99b37f06756fd921411538889199f5ae (patch)
tree7a37fcc54605bb3ac5dadf93f7211f35b09a402f /package/nginx/files
parentf2de641bb3fa05e28918693a45c43f9919130b96 (diff)
nginx: use user nginx, fix path to php socket
Diffstat (limited to 'package/nginx/files')
-rw-r--r--package/nginx/files/nginx.conf5
-rw-r--r--package/nginx/files/nginx.postinst3
2 files changed, 6 insertions, 2 deletions
diff --git a/package/nginx/files/nginx.conf b/package/nginx/files/nginx.conf
index ea11ef025..bc80bef6a 100644
--- a/package/nginx/files/nginx.conf
+++ b/package/nginx/files/nginx.conf
@@ -1,4 +1,5 @@
-worker_processes 1;
+user nginx;
+worker_processes 4;
events {
worker_connections 1024;
@@ -16,7 +17,7 @@ http {
root /srv/www/htdocs;
location ~ \.php$ {
- fastcgi_pass unix:/var/run/php5.sock;
+ fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
}
diff --git a/package/nginx/files/nginx.postinst b/package/nginx/files/nginx.postinst
index 557ccd181..322e99e06 100644
--- a/package/nginx/files/nginx.postinst
+++ b/package/nginx/files/nginx.postinst
@@ -1,3 +1,6 @@
#!/bin/sh
. $IPKG_INSTROOT/etc/functions.sh
+gid=$(get_next_gid)
+add_user nginx $(get_next_uid) $gid /srv/www
+add_group nginx $gid
add_rcconf nginx NO