Explorar el Código

nginx: use user nginx, fix path to php socket

Waldemar Brodkorb hace 2 años
padre
commit
6242087c99
Se han modificado 2 ficheros con 6 adiciones y 2 borrados
  1. 3 2
      package/nginx/files/nginx.conf
  2. 3 0
      package/nginx/files/nginx.postinst

+ 3 - 2
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;
         }

+ 3 - 0
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