상세 컨텐츠

본문 제목

[우분투] nextcloud carddav, caldav, webfinger, nodeinfo 작동 오류

본문

공식 홈페이지 문서에서는 .htaccess 파일을 수정하라고 하는데, 나는 아파치 폴더 안에 있는 nextcloud.conf를 수정해서 해결했다.

sudo nano /etc/apache2/sites-enabled/nextcloud.conf

로 파일을 열어주고, 맨 아래에 

Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger
Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo

를 삽입한 후 저장해 준다.

 

sudo service apache2 reload

이후 우분투를 다시 시작해주면 된다.

 

혹시 webfinger와 nodeinfo만 안사라진다면, 웹브라우저마다 다르지만

방문기록 >> 캐시 삭제를 해보면 좋을 것 같다. 내가 이렇게 해서 ㅎㅎ

 

물론 나는 .htaccess 파일 내에 넣으라던 문장도 넣어놔서 이것도 있어야 하는건지는 모르겠는데, 만약 위의 방법만으로 안된다면

sudo nano /var/www/html/nextcloud/.htaccess

로 파일을 열어서

 

<IfModule mod_rewrite.c>
  RewriteEngine on
  Redirect 301 /.well-known/carddav /nextcloud/remote.php/dav
  Redirect 301 /.well-known/caldav /nextcloud/remote.php/dav
  Redirect 301 /.well-known/webfinger /nextcloud/index.php/.well-known/webfinger
  Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo
  RewriteCond %{HTTP_USER_AGENT} DavClnt
  RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  RewriteRule ^remote/(.*) remote.php [QSA,L]
  RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  RewriteRule ^\.well-known/(?!acme-challenge|pki-validation) /index.php [QSA,L]
  RewriteRule ^(?:\.(?!well-known)|autotest|occ|issue|indie|db_|console).* - [R=404,L]
</IfModule>

여기서 Redirect 301.. 로 시작하는 저 4 줄을 추가해 주면 될 것 같다. 나같은 경우는 ctrl + w 눌러서 검색모드 들어가서

 

rewrite라고 검색하니까 바로 저 줄로 이동했다.

나도 아직 갈 길이 멀다

난 그럼 남은 오류를 해결하러 이만..

반응형

관련글 더보기

댓글 영역