시스템/패키지 정보

시스템/패키지 정보

최근 Debian 10 VPS에 Nextcloud를 스냅샷으로 설치했습니다. nextcloud.mysite.com의 역방향 프록시를 통해 Apache를 사용하여 이 인스턴스를 제공하고 싶습니다.

포트 80과 443에서 제공되는 웹 사이트가 있으므로 지침에 따라 Nextcloud 스냅의 http 포트를 81로 변경했습니다 sudo snap set nextcloud ports.http=81.

이를 통해 예상대로 nextcloud.mysite.com에 액세스할 수 있습니다. 그러나 htop보여주세요여러 php-fpm프로세스가 실행 중이어서 CPU 사용량이 100% 정도 안정적으로 유지됩니다.. 이러한 추가 프로세스는 어디에서 발생합니까? 포트를 변경하면 왜 이런 일이 발생합니까? Snap이 80이 아닌 81을 수신할 때만 이런 일이 발생한다는 것을 확인했습니다.

문제가 내 Apache 사이트 구성, 스냅 인스턴스 또는 기타 항목에 있는지 확실하지 않습니다.

시스템/패키지 정보

$ uname -a
Linux mysite.com 4.19.0-16-amd64 #1 SMP Debian 4.19.181-1 (2021-03-19) x86_64 GNU/Linux
$ snap version
snap    2.49.2
snapd   2.49.2
series  16
debian  10
kernel  4.19.0-16-amd64
$ sudo apache2 -v
Server version: Apache/2.4.38 (Debian)
Server built:   2020-08-25T20:08:29

아파치 사이트 구성

ServerName mysite.com
ServerAdmin webmaster@localhost
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined

<VirtualHost *:80>
    ServerName mysite.com
    ServerAdmin webmaster@localhost
    DocumentRoot /var/www/mysite
    RewriteEngine on
    RewriteCond %{SERVER_NAME} =mysite.com
    RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set X-Frame-Options: DENY
    Header always set X-Content-Type-Options: nosniff
    Header always set Content-Security-Policy "[...]"
<Directory /var/www/mysite>
    Options -Indexes
</Directory>
</VirtualHost>

<VirtualHost *:443>
    ServerName mysite.com
    ServerAlias www.mysite.com
    DocumentRoot /var/www/mysite
    Header always set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set X-Frame-Options: DENY
    Header always set X-Content-Type-Options: nosniff
    Header always set Content-Security-Policy "[...]"
<Directory /var/www/mysite>
    Options -Indexes
</Directory>
</VirtualHost>

<VirtualHost *:80>
    ServerName nextcloud.mysite.com
    Redirect Permanent / https://nextcloud.mysite.com
</VirtualHost>

<VirtualHost *:443>
    ServerName nextcloud.mysite.com
    ProxyRequests Off
    ProxyVia Off
    ProxyPreserveHost On
<Proxy *>
    Require all granted
</Proxy>
    RemoteIPHeader X-Forwarded-For
    RemoteIPTrustedProxy 127.0.0.1
    ProxyPass / http://127.0.0.1:81/
    ProxyPassReverse / http://127.0.0.1:81/
<IfModule mod_headers.c>
    Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains"
</IfModule>
<IfModule mod_rewrite.c>
    RewriteEngine on
    RewriteRule ^\.well-known/host-meta /nextcloud/public.php?service=host-meta [QSA,L]
    RewriteRule ^\.well-known/host-meta\.json /nextcloud/public.php?service=host-meta-json [QSA,L]
    RewriteRule ^\.well-known/webfinger /nextcloud/public.php?service=webfinger [QSA,L]
    RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
    RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav [R=301,L]    
</IfModule>
</VirtualHost>

SSLCertificateFile /etc/letsencrypt/live/mysite.com/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/mysite.com/privkey.pem

맨 위

htop은 실행 중인 프로세스를 표시합니다.

답변1

rclone여러 개의 새 파일을 Nextcloud 인스턴스에 로컬로 동기화하려고 합니다 . 이러한 파일은 포트 81을 통해 인스턴스에 액세스할 수 있을 때만 전송됩니다. 따라서 수신 대기 포트가 80으로 변경되고 연결이 설정되지 않으면 CPU 스파이크가 다시 떨어집니다.

관련 정보