From ee2a2354ea658dfa77466ebee60149f43daf2730 Mon Sep 17 00:00:00 2001 From: polytan02 Date: Fri, 13 Feb 2015 16:58:58 +0000 Subject: [PATCH] update of nginx According to http://www.rainloop.net/docs/installation/ we must protect the data folder. --- conf/create_database.sql | 1 + conf/nginx.conf | 37 ++++++++++++++++++++----------------- 2 files changed, 21 insertions(+), 17 deletions(-) create mode 100644 conf/create_database.sql diff --git a/conf/create_database.sql b/conf/create_database.sql new file mode 100644 index 0000000..165bab3 --- /dev/null +++ b/conf/create_database.sql @@ -0,0 +1 @@ +CREATE USER 'rainloop'@'%' IDENTIFIED BY '***';GRANT ALL PRIVILEGES ON *.* TO 'rainloop'@'%' IDENTIFIED BY '***' WITH GRANT OPTION MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0 MAX_USER_CONNECTIONS 0;CREATE DATABASE IF NOT EXISTS `rainloop`;GRANT ALL PRIVILEGES ON `rainloop`.* TO 'rainloop'@'%';GRANT ALL PRIVILEGES ON `rainloop\_%`.* TO 'rainloop'@'%'; \ No newline at end of file diff --git a/conf/nginx.conf b/conf/nginx.conf index fccb016..1596d0f 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -1,19 +1,22 @@ location PATHTOCHANGE { - alias ALIASTOCHANGE; - if ($scheme = http) { - rewrite ^ https://$server_name$request_uri? permanent; - } - client_max_body_size 10G; - index index.php; - try_files $uri $uri/ index.php; - location ~ [^/]\.php(/|$) { - fastcgi_split_path_info ^(.+?\.php)(/.*)$; - fastcgi_pass unix:/var/run/php5-fpm-rainloop.sock; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param REMOTE_USER $remote_user; - fastcgi_param PATH_INFO $fastcgi_path_info; - fastcgi_param SCRIPT_FILENAME $request_filename; - } - include conf.d/yunohost_panel.conf.inc; + alias ALIASTOCHANGE; + if ($scheme = http) { + rewrite ^ https://$server_name$request_uri? permanent; + } + client_max_body_size 10G; + index index.php; + try_files $uri $uri/ index.php; + location ~ [^/]\.php(/|$) { + fastcgi_split_path_info ^(.+?\.php)(/.*)$; + fastcgi_pass unix:/var/run/php5-fpm-rainloop.sock; + fastcgi_index index.php; + include fastcgi_params; + fastcgi_param REMOTE_USER $remote_user; + fastcgi_param PATH_INFO $fastcgi_path_info; + fastcgi_param SCRIPT_FILENAME $request_filename; + } + location ^~ /data { + deny all; + } + include conf.d/yunohost_panel.conf.inc; }