| @@ -1,112 +1,113 @@ | | | @@ -1,112 +1,113 @@ |
1 | =========================================================================== | | 1 | =========================================================================== |
2 | $NetBSD: MESSAGE,v 1.2 2017/04/05 12:33:49 fhajny Exp $ | | 2 | $NetBSD: MESSAGE,v 1.3 2018/11/22 12:30:49 ryoon Exp $ |
3 | | | 3 | |
4 | To use Nextcloud, you will need to perform the following steps. | | 4 | To use Nextcloud, you will need to perform the following steps. |
5 | | | 5 | |
6 | 1. If you want to use with MySQL server, install databases/mysql55-* | | 6 | 1. If you want to use with MySQL server, install databases/mysql55-* |
7 | and enable it, then create database. | | 7 | and enable it, then create database. |
8 | | | 8 | |
9 | 2. Install nginx httpd server, for example www/nginx. | | 9 | 2. Install nginx httpd server, for example www/nginx. |
10 | | | 10 | |
11 | 3. Install PHP-FPM, PHP FastCGI Process Magager from www/php-fpm. | | 11 | 3. Install PHP-FPM, PHP FastCGI Process Magager from www/php-fpm. |
12 | | | 12 | |
13 | 4. Be sure to have the following lines in ${PREFIX}/etc/nginx/nginx.conf | | 13 | 4. Be sure to have the following lines in ${PREFIX}/etc/nginx/nginx.conf |
14 | to enable PHP script in http://YOUR_SERVER_NAME/ . | | 14 | to enable PHP script in http://YOUR_SERVER_NAME/ . |
15 | From http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html . | | 15 | From http://doc.owncloud.org/server/6.0/admin_manual/installation/installation_source.html . |
16 | | | 16 | |
17 | http { | | 17 | http { |
18 | include ${PREFIX}/etc/nginx/mime.types; | | 18 | include ${PREFIX}/etc/nginx/mime.types; |
19 | | | 19 | |
20 | upstream php-handler { | | 20 | upstream php-handler { |
21 | server 127.0.0.1:9000; | | 21 | server 127.0.0.1:9000; |
22 | } | | 22 | } |
23 | | | 23 | |
24 | server { | | 24 | server { |
25 | listen 80; | | 25 | listen 80; |
26 | server_name YOUR_SERVER_NAME; | | 26 | server_name YOUR_SERVER_NAME; |
27 | | | 27 | |
28 | root ${PREFIX}/share/nextcloud; | | 28 | root ${PREFIX}/share/nextcloud; |
29 | | | 29 | |
30 | client_max_body_size 10G; # set max upload size | | 30 | client_max_body_size 10G; # set max upload size |
31 | fastcgi_buffers 64 4K; | | 31 | fastcgi_buffers 64 4K; |
32 | | | 32 | |
33 | rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; | | 33 | rewrite ^/caldav(.*)$ /remote.php/caldav$1 redirect; |
34 | rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; | | 34 | rewrite ^/carddav(.*)$ /remote.php/carddav$1 redirect; |
35 | rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; | | 35 | rewrite ^/webdav(.*)$ /remote.php/webdav$1 redirect; |
36 | | | 36 | |
37 | index index.php; | | 37 | index index.php; |
38 | error_page 403 /core/templates/403.php; | | 38 | error_page 403 /core/templates/403.php; |
39 | error_page 404 /core/templates/404.php; | | 39 | error_page 404 /core/templates/404.php; |
40 | | | 40 | |
41 | location = /robots.txt { | | 41 | location = /robots.txt { |
42 | allow all; | | 42 | allow all; |
43 | log_not_found off; | | 43 | log_not_found off; |
44 | access_log off; | | 44 | access_log off; |
45 | } | | 45 | } |
46 | | | 46 | |
47 | location ~ ^/(data|config|\.ht|db_structure\.xml|README) { | | 47 | location ~ ^/(data|config|\.ht|db_structure\.xml|README) { |
48 | deny all; | | 48 | deny all; |
49 | } | | 49 | } |
50 | | | 50 | |
51 | location / { | | 51 | location / { |
52 | # The following 2 rules are only needed with webfinger | | 52 | # The following 2 rules are only needed with webfinger |
53 | rewrite ^/.well-known/host-meta /public.php?service=host-meta last; | | 53 | rewrite ^/.well-known/host-meta /public.php?service=host-meta last; |
54 | rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; | | 54 | rewrite ^/.well-known/host-meta.json /public.php?service=host-meta-json last; |
55 | | | 55 | |
56 | rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; | | 56 | rewrite ^/.well-known/carddav /remote.php/carddav/ redirect; |
57 | rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; | | 57 | rewrite ^/.well-known/caldav /remote.php/caldav/ redirect; |
58 | | | 58 | |
59 | rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; | | 59 | rewrite ^(/core/doc/[^\/]+/)$ $1/index.html; |
60 | | | 60 | |
61 | try_files $uri $uri/ index.php; | | 61 | try_files $uri $uri/ index.php; |
62 | } | | 62 | } |
63 | | | 63 | |
64 | location ~ ^(.+?\.php)(/.*)?$ { | | 64 | location ~ ^(.+?\.php)(/.*)?$ { |
65 | try_files $1 =404; | | 65 | try_files $1 =404; |
66 | | | 66 | |
67 | include fastcgi_params; | | 67 | include fastcgi_params; |
68 | fastcgi_param SCRIPT_FILENAME $document_root$1; | | 68 | fastcgi_param SCRIPT_FILENAME $document_root$1; |
69 | fastcgi_param PATH_INFO $2; | | 69 | fastcgi_param PATH_INFO $2; |
70 | fastcgi_pass php-handler; | | 70 | fastcgi_pass php-handler; |
71 | } | | 71 | } |
72 | | | 72 | |
73 | # Optional: set long EXPIRES header on static assets | | 73 | # Optional: set long EXPIRES header on static assets |
74 | location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ { | | 74 | location ~* ^.+\.(jpg|jpeg|gif|bmp|ico|png|css|js|swf)$ { |
75 | expires 30d; | | 75 | expires 30d; |
76 | # Optional: Don't log access to assets | | 76 | # Optional: Don't log access to assets |
77 | access_log off; | | 77 | access_log off; |
78 | } | | 78 | } |
79 | | | 79 | |
80 | } | | 80 | } |
81 | } | | 81 | } |
82 | | | 82 | |
83 | 5. Be sure to have the following lines in ${PREFIX}/etc/php-fam.conf | | 83 | 5. Be sure to have the following lines in ${PREFIX}/etc/php-fam.conf |
84 | to restrict access from localhost only. | | 84 | to restrict access from localhost only. |
85 | | | 85 | |
86 | listen.allowed_clients = 127.0.0.1 | | 86 | listen.allowed_clients = 127.0.0.1 |
87 | | | 87 | |
88 | 6. Be sure to have the following lines in ${PREFIX}/etc/php.ini. | | 88 | 6. Be sure to have the following lines in ${PREFIX}/etc/php.ini. |
89 | | | 89 | |
90 | extension=curl.so | | 90 | extension=curl.so |
91 | extension=gd.so | | 91 | extension=gd.so |
92 | extension=iconv.so | | 92 | extension=iconv.so |
| | | 93 | extension=intl.so |
93 | extension=json.so | | 94 | extension=json.so |
94 | extension=mbstring.so | | 95 | extension=mbstring.so |
95 | extension=zip.so | | 96 | extension=zip.so |
96 | extension=zlib.so | | 97 | extension=zlib.so |
97 | | | 98 | |
98 | extension=pdo.so ;if you select sqlite backend. | | 99 | extension=pdo.so ;if you select sqlite backend. |
99 | extension=pdo_sqlite.so ;if you select sqlite backend. | | 100 | extension=pdo_sqlite.so ;if you select sqlite backend. |
100 | extension=pdo_mysql.so ;if you select MySQL backend. | | 101 | extension=pdo_mysql.so ;if you select MySQL backend. |
101 | extension=pdo_pgsql.so ;if you select PostgreSQL backend. | | 102 | extension=pdo_pgsql.so ;if you select PostgreSQL backend. |
102 | | | 103 | |
103 | 7. Start PHP-FPM daemon. | | 104 | 7. Start PHP-FPM daemon. |
104 | | | 105 | |
105 | ${RCD_SCRIPTS_DIR}/php_fpm start | | 106 | ${RCD_SCRIPTS_DIR}/php_fpm start |
106 | | | 107 | |
107 | 8. Start nginx httpd server. | | 108 | 8. Start nginx httpd server. |
108 | | | 109 | |
109 | ${RCD_SCRIPTS_DIR}/nginx start | | 110 | ${RCD_SCRIPTS_DIR}/nginx start |
110 | | | 111 | |
111 | 6. Access http://YOUR_SERVER_NAME/ and setup. | | 112 | 6. Access http://YOUR_SERVER_NAME/ and setup. |
112 | =========================================================================== | | 113 | =========================================================================== |