0

Fresh install of Nextcloud 12 on Centos 7 using apache. I haven't configured anything yet but I keep getting the following error codes on the admin console:

X-Frame-Options" HTTP header is not configured to equal to "SAMEORIGIN

X-Content-Type-Options" HTTP header is not configured to equal to "nosniff

I've looked at the .htaccess file and I have both of those set, but when I restart Apache the error persists.

 <IfModule mod_env.c>
# Add security and privacy related headers
Header set X-Content-Type-Options "nosniff"
Header set X-Frame-Options "SAMEORIGIN"
Header set X-XSS-Protection "1; mode=block"
Header set X-Robots-Tag "none"
Header set X-Download-Options "noopen"
Header set X-Permitted-Cross-Domain-Policies "none"
SetEnv modHeadersAvailable true
</IfModule>
0

Hey looks like apache is not reading the .htaccess file this is usually fixed by the following:

sudo nano /etc/httpd/conf/httpd.conf

DocumentRoot "/var/www/html"

After the section ends<Directory "/var/www/html"> </Directory>

<Directory /var/www/html/nextcloud>
AllowOverride ALL
Require all granted
</Directory>

Here is a full install guide of nextcloud on centos 7

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.