Skip to content

Latest commit

 

History

History
40 lines (27 loc) · 663 Bytes

README.md

File metadata and controls

40 lines (27 loc) · 663 Bytes

NGINX and PHP-FPM

Ordnerstruktur: /opt/www/$user

One-time config:

  • add the next line at the end of /etc/php5/fpm/php-fpm.conf
include=/opt/www/*/php-fpm-pool.conf
  • add include /opt/www/*/nginx-server.conf; in the http block of /etc/nginx/nginx.conf
http {
        [...]
        include /opt/www/*/nginx-server.conf;
        [...]
}
  • copy the TEMPLATE folder to /opt/www/

create a user/site:

  • sudo ./addsftpuser.sh $user
  • restart nginx and php-fpm
optional:
  • passwd $user to enable login
  • edit domains in /opt/www/$user/nginx-server.conf
[...]
server_name $user.de www.$user.de;
[...]