serverapps:nextcloud:04.nginx_config
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
serverapps:nextcloud:04.nginx_config [2023/08/07 04:43] – [/usr/local/etc/nginx/conf.d/php-fpm] hayashi | serverapps:nextcloud:04.nginx_config [2023/08/26 10:55] (現在) – hayashi | ||
---|---|---|---|
行 7: | 行 7: | ||
\\ | \\ | ||
+ | ===== rc.conf ===== | ||
+ | |||
+ | / | ||
+ | |||
+ | php_fpm_enable=" | ||
+ | nginx_enable=" | ||
===== / | ===== / | ||
行 21: | 行 27: | ||
worker_connections 1024; | worker_connections 1024; | ||
multi_accept | multi_accept | ||
- | accept_mutex on; | + | accept_mutex |
accept_mutex_delay | accept_mutex_delay | ||
} | } | ||
行 47: | 行 53: | ||
server { | server { | ||
listen 80; | listen 80; | ||
- | listen [::]:80; | + | |
# server_name cloud.example.com; | # server_name cloud.example.com; | ||
行 57: | 行 63: | ||
# Path to the root of your installation | # Path to the root of your installation | ||
- | root / | + | |
+ | root /usr/local/ | ||
# HTTP response headers borrowed from Nextcloud `.htaccess` | # HTTP response headers borrowed from Nextcloud `.htaccess` | ||
行 125: | 行 132: | ||
# then Nginx will encounter an infinite rewriting loop when it prepends `/ | # then Nginx will encounter an infinite rewriting loop when it prepends `/ | ||
# to the URI, resulting in a HTTP 500 error response. | # to the URI, resulting in a HTTP 500 error response. | ||
- | location ~ \.php(?: | + | |
- | # Required for legacy support | + | # |
- | rewrite ^/ | + | # |
- | + | # | |
- | | + | # |
- | set $path_info $fastcgi_path_info; | + | # |
- | + | # | |
- | | + | # |
- | + | # | |
- | | + | # |
- | fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; | + | # |
- | fastcgi_param PATH_INFO $path_info; | + | # |
- | fastcgi_param HTTPS on; | + | # |
- | + | # | |
- | | + | # |
- | fastcgi_param front_controller_active true; # Enable pretty urls | + | # |
- | fastcgi_pass php-handler; | + | |
- | + | ||
- | | + | |
- | fastcgi_request_buffering off; | + | |
- | + | ||
- | | + | |
- | } # End location | + | |
| | ||
| | ||
行 193: | 行 194: | ||
client_body_buffer_size | client_body_buffer_size | ||
# set max upload size and increase upload timeout: | # set max upload size and increase upload timeout: | ||
- | client_max_body_size | + | # client_max_body_size |
+ | client_max_body_size | ||
# client_body_timeout | # client_body_timeout | ||
client_body_timeout | client_body_timeout | ||
行 238: | 行 240: | ||
===== / | ===== / | ||
<file conf php-fpm> | <file conf php-fpm> | ||
+ | # Required for legacy support | ||
+ | rewrite ^/ | ||
fastcgi_pass | fastcgi_pass | ||
- | fastcgi_param | ||
- | try_files | ||
# fastcgi_split_path_info | # fastcgi_split_path_info | ||
fastcgi_split_path_info | fastcgi_split_path_info | ||
+ | set $path_info $fastcgi_path_info; | ||
+ | fastcgi_param | ||
+ | fastcgi_param | ||
+ | try_files | ||
fastcgi_index | fastcgi_index | ||
fastcgi_intercept_errors | fastcgi_intercept_errors | ||
行 257: | 行 263: | ||
# pkg default file | # pkg default file | ||
include | include | ||
+ | # for nextcloud | ||
+ | fastcgi_param | ||
+ | fastcgi_param | ||
+ | fastcgi_request_buffering | ||
+ | fastcgi_max_temp_file_size | ||
</ | </ | ||
+ | |||
+ | ===== 設定チェック ===== | ||
+ | |||
+ | # service nginx configtest | ||
+ | | ||
+ | # nginx -t |
serverapps/nextcloud/04.nginx_config.1691383437.txt.gz · 最終更新: 2023/08/07 04:43 by hayashi