티스토리 뷰
설치 환경
nginx / php7 / mariaDB
설치 시 무들호스팅 동일 경로에 moodledata 폴더를 777로 생성해둠
/moodle
/moodledata
nginx 가상호스팅 설정
1 server {
2 listen 80;
3
4 server_name moodle.greenart.co.kr;
5
6 #charset koi8-r;
7 #access_log /var/log/nginx/log/host.access.log main;
8
9 index index.php index.html index.htm;
10 root /home/ftpuser;
11 error_log /var/log/nginx/moodle_errors.log; #REPLACE MOODLE ERROR LOG PATH
12 access_log /var/log/nginx/moodle_access.log; #REPLACE MOODLE ACCESS LOG PATH
13
14 rewrite ^/(.*\.php)(/)(.*)$ /$1?file=/$3 last;
15
16
17 location / {
18 try_files $uri $uri/ /index.php?$query_string;
19 }
20
21
22 # catch all
23 error_page 404 /index.php;
24
25 location = /favicon.ico {
26 log_not_found off;
27 access_log off;
28 }
29
30 location = /robots.txt {
31 allow all;
32 log_not_found off;
33 access_log off;
34 }
35
36 error_page 404 /404.html;
37 # redirect server error pages to the static page /50x.html
38 #
39 error_page 500 502 503 504 /50x.html;
40 location = /50x.html {
41 root /usr/share/nginx/html;
42 }
43
44 location ~ \.php$ {
45 fastcgi_split_path_info ^(.+\.php)(/.+)$;
46 fastcgi_index index.php;
47 fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
48 fastcgi_param PATH_INFO $fastcgi_path_info;
49 fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
50 include fastcgi_params;
51 }
52 }
DB는 무들에서 사용할 계정생성 후 기본 언어셋 관련된 설정을 모드 utf8mb4로 세팅 변경 /etc/mysql/mariadb.confd/ 경로 하위 폴더들 확인
호스팅 파일 생성 후 도메인 접속하면 세팅을 시작한다..
진행하면서 필수로 설치해야하는 패키지들 안내해주니 설치 후 진행하면 완료됨.
'serverSide > Linux' 카테고리의 다른 글
ftp 설정 시 acl을 이용한 여러계정(멀티계정) 한 폴더 업로드 권한 주기 (0) | 2018.08.22 |
---|---|
[NGINX LOG] 로그 분석 goaccess (0) | 2018.02.23 |
[ubuntu 16.04] mariaDB 10.0 외부접속 설정 시 10061 에러 (1) | 2017.09.06 |
우분투 CIFS PHP 업로드 시 권한 (0) | 2017.05.10 |
우분투16.04 + php7 + MSSQL2005 연동 (2) | 2017.04.14 |