Appliance disable https redirect

First, we’ll try to get the Nextcloud instance working before disabling htpps. (Do you really want to disable https?, it’s not very safe if you do).

What happens if you try to activate only the Apache configuration nextcloud.conf?
To check whether only the nextcloud.conf configuration is enabled, run the following command:
ls /etc/apache2/sites-enabled/.

I want it to be disabled because i only use my cloud for myself locally at home. If i access it from outside i use my vpn. So https wouldn’t provide that much more security but every time i want to open it i get that annoying “unsafe website” message because my local ip obviously doesn’t have a valid ssl certificate. God i wish the “unsafe website” message would now be my only problem… :smiley: Never touch a running system!

Currently ls /etc/apache2/sites-enabled/ looks like this:

root@nextcloudpi:/etc/apache2/sites-available# ls ../sites-enabled/
ncp-activation.conf  ncp.conf  nextcloud.conf

if i go into sites-available and run a2dissite *.conf the output of ls /etc/apache2/sites-enabled/ is empty so in fact nothing is running.

Now i run a2ensite nextcloud.conf and the output looks like this:

root@nextcloudpi:/etc/apache2/sites-available# a2ensite nextcloud.conf 
Enabling site nextcloud.
To activate the new configuration, you need to run:
  systemctl reload apache2
root@nextcloudpi:/etc/apache2/sites-available# systemctl restart apache2
root@nextcloudpi:/etc/apache2/sites-available# ls ../sites-enabled/
nextcloud.conf

In result i get the standard Apache 2 Default Page when calling the cloud:

hmmm …:thinking:

Can you provide the content of each config files, please ?

Your Nextcloud installation is in /var/www/ncp-web ?

Sure can do:

000-default.conf

default-ssl.conf




ncp-activation.conf

ncp.conf

nextcloud.conf

I guess so. At least it looks like that:

root@nextcloudpi:/var/www/ncp-web# ls
activate	   download.php  L10N.php	   upload.php
backups.php	   elements.php  langs.cfg	   wizard
csrf.php	   img		 ncp-launcher.php  wizard.cfg
css		   index.php	 ncp-output.php
decrypt		   js		 ncp-wait-msg.php
download_logs.php  l10n		 ncp-web.cfg

Thank you.
Now it’s clearer. :slight_smile:

This should work to disable https on your Nextcloud instance.

  • Disable all your Apache configs with sudo a2dissite *.conf
  • Create a backup of the file 000-default.conf
  • Edit the file 000-default.conf to have the following content:
<Directory /var/www/nextcloud/>
  Require all granted
  AllowOverride All
  Options FollowSymLinks MultiViews
  <IfModule mod_dav.c>
    Dav off
  </IfModule>
</Directory>

<VirtualHost *:80>
    DocumentRoot /var/www/nextcloud
</VirtualHost>
  • Enable the config with: sudo a2ensite 000-default.conf
  • Restart Apache with sudo systemctl restart apache2
  • Go to your browser and open a new private window then enter : http://your-ip
  • You should have access to your Nextcloud in http

According to your screenshot, the directory /var/www/ncp-web doesn’t seem to be a Nextcloud installation folder. I think it is in /var/www/nextcloud

That’s wonderfull! I will try that as soon as my cloud back online!

As far as the installation folder goes:

root@nextcloudpi:/var/www/nextcloud# ls
3rdparty  console.php  data	   occ		 public.php  settings	 version.php
apps	  COPYING      index.html  ocm-provider  remote.php  status.php
AUTHORS   core	       index.php   ocs		 resources   themes
config	  cron.php     lib	   ocs-provider  robots.txt  updater

Just for the record:

I couldn’t repair it after all an reinstalled my whole system.