Hi all
How can I resolve this warning:
My nextcloud.conf
Can you add “Require all granted” below “AllowOverride All”
For the memcache i have two tutorials:
Configure nextcloud config.php like this
’filelocking.enabled’ => true,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘memcache.local’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
‘dbindex’ => 1,
‘timeout’ => 0.0,
I do not use ‘dbindex’ => 0, as 0 is used by a lot of applications by default (if not configured) and so there may be a conflict at later times.
Can you access https://yourserver.com/nextcloud/data/files//somefile?
Can you post your htaccess?
You have only two vhost? One for *:80 and one for *:443?
Are the recommended modules enabled for apache?
https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#apache-configuration-label
Hi dear jamin587,
I apologize for late response.
Can you access https://yourserver.com/nextcloud/data/files//somefile?
I don’t understand you mean.
Can you post your htaccess?
# Let browsers cache WOFF files for a week
<FilesMatch “.woff$”>
Header set Cache-Control "max-age=604800"
php_value upload_max_filesize 511M
php_value post_max_size 511M
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value always_populate_raw_post_data -1
php_value default_charset 'UTF-8’
php_value output_buffering 0
SetEnv htaccessWorking true
php_value upload_max_filesize 511M
php_value post_max_size 511M
php_value memory_limit 512M
php_value mbstring.func_overload 0
php_value default_charset 'UTF-8’
php_value output_buffering 0
SetEnv htaccessWorking true
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} DavClnt
RewriteRule ^$ /remote.php/webdav/ [L,R=302]
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteRule ^.well-known/host-meta /public.php?service=host-meta [QSA,L]
RewriteRule ^.well-known/host-meta.json /public.php?service=host-meta-json [QSA,L]
RewriteRule ^.well-known/carddav /remote.php/dav/ [R=301,L]
RewriteRule ^.well-known/caldav /remote.php/dav/ [R=301,L]
RewriteRule ^remote/(.) remote.php [QSA,L]
RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/. - [R=404,L]
RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*
RewriteRule ^(?:.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
DirectoryIndex index.php index.html
AddDefaultCharset utf-8
Options -Indexes
ModPagespeed Off
#### DO NOT CHANGE ANYTHING ABOVE THIS LINE ####
ErrorDocument 403 /nextcloud/core/templates/403.php
ErrorDocument 404 /nextcloud/core/templates/404.php
You have only two vhost? One for *:80 and one for *:443?
Yes, I have one vhost.
Are the recommended modules enabled for apache?
a2query -m result:
autoindex (enabled by maintainer script)
authn_file (enabled by maintainer script)
env (enabled by maintainer script)
mime (enabled by maintainer script)
auth_basic (enabled by maintainer script)
authn_core (enabled by maintainer script)
access_compat (enabled by maintainer script)
socache_shmcb (enabled by site administrator)
ssl (enabled by site administrator)
php7.0 (enabled by maintainer script)
mpm_prefork (enabled by maintainer script)
authz_host (enabled by maintainer script)
rewrite (enabled by site administrator)
filter (enabled by maintainer script)
alias (enabled by maintainer script)
setenvif (enabled by maintainer script)
status (enabled by maintainer script)
authz_core (enabled by maintainer script)
negotiation (enabled by maintainer script)
dir (enabled by maintainer script)
deflate (enabled by maintainer script)
headers (enabled by site administrator)
authz_user (enabled by maintainer script)
@kasra7
You have to insert "Header always set Strict-Transport-Security “max-age=15552000; includeSubDomains; preload” into your SSL.conf. In your example you edited the non-ssl.config -> *:80 = HTTP| *:443 -> HTTPS
Redis must be configured in your config.php -> /var/www/nextcloud/config/config.php
Be aware that on some installations you have to install a redisserver first.
Also i like to use APCu for the local memcache (it’s faster than redis) and let redis do the locking like:
‘memcache.local’ => ‘\OC\Memcache\APCu’,
‘memcache.locking’ => ‘\OC\Memcache\Redis’,
‘redis’ =>
array (
‘host’ => ‘localhost’,
‘port’ => 6379,
),
But APCu must also be installed by hand. This will solve the "No memory sache has been configured"
Also i haven’t changed anything in my .htaccess.
Did you change the location of the “www” folder from “/var/www/” to “/www/”?
Please make sure to run the following commands on your webserver in order to enable your .htaccess:
a2enmod rewrite
a2enmod headers
a2enmod env
a2enmod dir
a2enmod mime
And dont forget to reload and restart your webserver
Dear TheMrApostel,
Where do I have insert Header always set Strict-Transport-Security in “/etc/apache2/sites-available/default-ssl.conf” ?
I did change the location for test and then it change to default setting
rewrite, headers, env, dir, mime
Modules already enabled.
You can insert it anywhere in your default-ssl.conf but make sure that this config is enabled.
You can check that by taking a look into /etc/apache2/sites-enabled/
All your active configurations should be listed here.
If not just link the existing configuration to that folder (do not copy the configuration):
sudo ln -s /etc/apache2/sites-available/default-ssl.conf /etc/apache2/sites-enabled/000-default-ssl.conf
I did Insert below config in default-ssl.conf and then the “Strict-Transport-Security …” warning is resolved. Is it config Currect?
<Directory "/var/www/html/nextcloud">
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
</IfModule>
</Directory>
How can I resolve this warning?
Please add “Options +FollowSymlinks” and “AllowOverride All” in your config file:
<Directory "/var/www/html/nextcloud">
Options +FollowSymlinks
AllowOverride All
<IfModule mod_headers.c>
Header always set Strict-Transport-Security "max-age=15552000; includeSubDomains; preload"
</IfModule>
</Directory>
And dont forget to reload your apache config with:
service apache2 reload
I also like to restart the service with:
service apache2 restart
TheMrApostel,
Thanks a lot.