nextcloud吧 关注:482贴子:1,169
  • 10回复贴,共1

Nextcloud 配置好了老是有两条网页服务器配置警告求大神指点

只看楼主收藏回复


搜了很多网友的教程,设置完后警告还是有。


1楼2020-12-04 16:03回复
    nginx可以解决这个问题


    IP属地:广东2楼2020-12-21 10:59
    回复
      nginx 添加伪静态:
      我的nextcloud安装在网站的二级目录下:
      rewrite /.well-known/carddav /nextcloud/remote.php/dav permanent;
      rewrite /.well-known/caldav /nextcloud/remote.php/dav permanent;
      如果根目录就是nextcloud:
      rewrite /.well-known/carddav /remote.php/dav permanent;
      rewrite /.well-known/caldav /remote.php/dav permanent;


      IP属地:江苏3楼2021-01-10 19:48
      收起回复
        官方说明:https://docs.nextcloud.com/server/23/admin_manual/issues/general_troubleshooting.html#service-discovery-label
        我的是Debian,apahce2。apache2欢迎页没有动过,nextcloud按官方文档放在/var/www/nextcloud目录下。长话短说。
        打开/etc/apache2/sites-available/000-default.conf
        如果原来代码长这样:
        <VirtualHost *:80>
        # The ServerName directive sets the request scheme, hostname and port that
        # the server uses to identify itself. This is used when creating
        # redirection URLs. In the context of virtual hosts, the ServerName
        # specifies what hostname must appear in the request's Host: header to
        # match this virtual host. For the default virtual host (this file) this
        # value is not decisive as it is used as a last resort host regardless.
        # However, you must set it for any further virtual host explicitly.
        #ServerName http://www.example.com
        ServerAdmin webmaster@localhost
        DocumentRoot /var/www/html
        # Available loglevels: trace8, ..., trace1, debug, info, notice, warn,
        # error, crit, alert, emerg.
        # It is also possible to configure the loglevel for particular
        # modules, e.g.
        #LogLevel info ssl:warn
        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
        # For most configuration files from conf-available/, which are
        # enabled or disabled at a global level, it is possible to
        # include a line for only one particular virtual host. For example the
        # following line enables the CGI configuration for this host only
        # after it has been globally disabled with "a2disconf".
        #Include conf-available/serve-cgi-bin.conf
        </VirtualHost>
        # vim: syntax=apache ts=4 sw=4 sts=4 sr noet
        则添加如下代码:
        <Directory /var/www/html>
        AllowOverride All
        </Directory>
        在/var/www/html下添加.htaccess文件,添加如下代码:
        <IfModule mod_rewrite.c>
        RewriteEngine on RewriteRule ^\.well-known/carddav /nextcloud/remote.php/dav [R=301,L]
        RewriteRule ^\.well-known/caldav /nextcloud/remote.php/dav [R=301,L]
        RewriteRule ^\.well-known/webfinger /nextcloud/index.php/.well-known/webfinger [R=301,L]
        RewriteRule ^\.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo [R=301,L]
        </IfModule>
        听懂掌声。


        5楼2022-02-23 15:13
        回复
          #编辑Nextcloud的配置目录:config/nginx/site-confs/default文件,
          添加下面命令行: # yourdomian.com 要填你的域名
          location = /.well-known/carddav { return 301 https://yourdomian.com/remote.php/dav;}
          location = /.well-known/caldav { return 301 https://yourdomian.com/remote.php/dav/;}
          location = /.well-known/webfinger { return 301 https://yourdomian.com/index.php/.well-known/webfinger;} location = /.well-known/nodeinfo { return 301 https://yourdomian.com/index.php/.well-known/nodeinfo;}
          #注销掉下面的两个实例


          IP属地:四川6楼2022-03-26 21:31
          收起回复