From 6242087c99b37f06756fd921411538889199f5ae Mon Sep 17 00:00:00 2001 From: Waldemar Brodkorb Date: Sun, 21 Jan 2024 12:47:41 +0100 Subject: nginx: use user nginx, fix path to php socket --- package/nginx/files/nginx.conf | 5 +++-- package/nginx/files/nginx.postinst | 3 +++ 2 files changed, 6 insertions(+), 2 deletions(-) (limited to 'package/nginx/files') 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 -- cgit v1.2.3