Apache config / Nextcloud App

Nextcloud version (eg, 10.0.2): 11.0.0 (stable) in Docker docker hub
Host Operating system and version (eg, Ubuntu 16.04): Ubuntu 16.04
Apache (eg, Apache 2.4.25)_: Apache/2.4.18 (Ubuntu)
PHP version (eg, 5.6): PHP 7.0.8-0ubuntu0.16.04.3

i’m using the android app of nextcloud and can’t connect to my server when im using the url https://nc.server.de
Nextcloud runs in docker.
The Connection is working like charm when im using the local url, like http://192.168.x.xx:8080.
Should i add something in the apache config?

Thanks u guys for helping me out.


The output of your config.php file in /path/to/nextcloud

$CONFIG = array (
  'datadirectory' => '/data',
  'apps_paths' => array (
    0 => array (
      'path' => '/nextcloud/apps',
      'url' => '/apps',
      'writable' => false,
    1 => array (
      'path' => '/apps2',
      'url' => '/apps2',
      'writable' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>   array(
    'host' => '/tmp/redis.sock',
    'port' => 0,
    'timeout' => 0.0,
  'instanceid' => 'something',
  'passwordsalt' => 'something',
  'secret' => 'something',
  'trusted_domains' => array (
    0 => 'localhost',
    1 => 'nc.server.de',
  'overwrite.cli.url' => 'https://nc.server.de',
  'dbtype' => 'mysql',
  'version' => '',
  'dbname' => 'bar',
  'dbhost' => 'db_foo',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'foo',
  'dbpassword' => 'something',
  'logtimezone' => 'Europe/Berlin',
  'installed' => true,
  'logdateformat' => 'Y-m-d H:i:s',
  'appstore.experimental.enabled' => true,
  'mail_smtpmode' => 'smtp',
  'default_language' => 'de',
  'updater.release.channel' => 'stable',
  'loglevel' => 0,
  'maintenance' => false,

Output of apache conf:

<VirtualHost *:80>
        ServerName nc.server.de
        Redirect permanent "/"  "https://nc.server.de/"

<IfModule mod_ssl.c>
<VirtualHost *:443>
        ServerAdmin foo
        ServerName nc.server.de
<IfModule mod_headers.c>
        Header always set Strict-Transport-Security "max-age=15768000; includeSubDomains; preload"

        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all

         <Proxy *>
              Order deny,allow
              Allow from all

    ProxyPass /
    ProxyPassReverse /

        ErrorLog ${APACHE_LOG_DIR}/error.log

        LogLevel warn

        CustomLog ${APACHE_LOG_DIR}/ssl_access.log combined

        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
                Options Indexes MultiViews FollowSymLinks
                AllowOverride None
                Order deny,allow
                Deny from all
                Allow from ::1/128

      SSLEngine on
       SSLCertificateFile    /etc/letsencrypt/live/nc.server.de-0002/fullchain.pem
       SSLCertificateKeyFile /etc/letsencrypt/live/nc.server.de-0002/privkey.pem

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        # MSIE 7 and newer should be able to use keepalive
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

Can you access your instance through apache on the LAN?

I can use my nextcloud through lan, internet even through the windows app. But no android client is working (tested on several android phones).
Everything works like it should, except the android client through the internet.

Sorry matti you didn’t answer my question.

It’s not important if you can access it on 8080, I want to know if you can access it from in your LAN via Apache, therefore showing the proxypass works. You can edit your hosts file to emulate the domain resolving to the apache server if you need to.

If you can’t get to NC through Apache internally, you can check the Apache logs in the first instance.

Hi Jason,
thank you for your support. I can’t access via LAN or Internet. Is there any config entry which blocks the possibility to get connected with the client?