문서의 선택한 두 판 사이의 차이를 보여줍니다.
nextcloud_삽질 [2019/07/05 02:27] gsjung 만듦 |
nextcloud_삽질 [2021/04/13 06:54] |
||
---|---|---|---|
줄 1: | 줄 1: | ||
- | < | ||
- | 기본적으로 [[https:// | ||
- | |||
- | ===== 서버들 ===== | ||
- | 내 nginx 설정 | ||
- | < | ||
- | upstream php-handler { | ||
- | server 127.0.0.1: | ||
- | } | ||
- | |||
- | server { | ||
- | listen 80; | ||
- | server_name 192.168.1.131; | ||
- | |||
- | # Add headers to serve security related headers | ||
- | add_header X-Content-Type-Options nosniff; | ||
- | add_header X-XSS-Protection "1; mode=block"; | ||
- | add_header X-Robots-Tag none; | ||
- | add_header X-Download-Options noopen; | ||
- | add_header X-Permitted-Cross-Domain-Policies none; | ||
- | |||
- | #This header is already set in PHP, so it is commented out here. | ||
- | #add_header X-Frame-Options " | ||
- | |||
- | # Path to the root of your installation | ||
- | root / | ||
- | |||
- | location = /robots.txt { | ||
- | allow all; | ||
- | log_not_found off; | ||
- | access_log off; | ||
- | } | ||
- | |||
- | # The following 2 rules are only needed for the user_webfinger app. | ||
- | # Uncomment it if you're planning to use this app. | ||
- | #rewrite ^/ | ||
- | #rewrite ^/ | ||
- | # last; | ||
- | |||
- | location = / | ||
- | return 301 $scheme:// | ||
- | } | ||
- | location = / | ||
- | | ||
- | } | ||
- | |||
- | location ~ / | ||
- | allow all; | ||
- | } | ||
- | |||
- | # set max upload size | ||
- | client_max_body_size 512M; | ||
- | fastcgi_buffers 64 4K; | ||
- | |||
- | # Disable gzip to avoid the removal of the ETag header | ||
- | gzip off; | ||
- | |||
- | # Uncomment if your server is build with the ngx_pagespeed module | ||
- | # This module is currently not supported. | ||
- | #pagespeed off; | ||
- | |||
- | error_page 403 / | ||
- | error_page 404 / | ||
- | |||
- | location / { | ||
- | | ||
- | } | ||
- | |||
- | location ~ ^/ | ||
- | deny all; | ||
- | } | ||
- | location ~ ^/ | ||
- | deny all; | ||
- | } | ||
- | |||
- | location ~ ^/ | ||
- | | ||
- | | ||
- | | ||
- | | ||
- | # | ||
- | | ||
- | | ||
- | | ||
- | # | ||
- | # | ||
- | | ||
- | | ||
- | } | ||
- | |||
- | location ~ ^/ | ||
- | | ||
- | index index.php; | ||
- | } | ||
- | |||
- | # Adding the cache control header for js and css files | ||
- | # Make sure it is BELOW the PHP block | ||
- | location ~* \.(?: | ||
- | try_files $uri / | ||
- | add_header Cache-Control " | ||
- | # Add headers to serve security related headers (It is intended to | ||
- | # have those duplicated to the ones above) | ||
- | add_header X-Content-Type-Options nosniff; | ||
- | add_header X-XSS-Protection "1; mode=block"; | ||
- | add_header X-Robots-Tag none; | ||
- | add_header X-Download-Options noopen; | ||
- | add_header X-Permitted-Cross-Domain-Policies none; | ||
- | # Optional: Don't log access to assets | ||
- | access_log off; | ||
- | } | ||
- | |||
- | | ||
- | try_files $uri / | ||
- | # Optional: Don't log access to other assets | ||
- | access_log off; | ||
- | } | ||
- | } | ||
- | |||
- | </ | ||
- | ===== 데이터 옮기기 ===== | ||
- | [[https:// | ||
- | |||
- | < | ||
- | 1. sudo -u www-data php / | ||
- | 2. mkdir -p / | ||
- | 3. cp -a / | ||
- | 4. chown -R www-data: | ||
- | 5. nano / | ||
- | ' | ||
- | 6. mysqldump -u< | ||
- | 7. Adjust " | ||
- | mysql -u< | ||
- | //enter mysql root password, then within mysql console: | ||
- | use < | ||
- | update oc_storages set id=' | ||
- | quit; | ||
- | 8. sudo -u www-data php / | ||
- | </ | ||
- | |||
- | ===== Redis ===== | ||
- | 기초적인 세팅: [[https:// | ||
- | |||
- | redis 쓸 때 selinux가 진짜 그지같이 군다. | ||
- | |||
- | redis 실행: [[https:// | ||
- | |||
- | 유닉스소켓으로 연결할 때: [[https:// | ||
- | |||
- | 아 그냥 selinux 끌까 ㅠ |