I ran my nextcloud on port 63222 and everything was working great.
I now switched (or wanted to at least) to 443 so I can make use of Letâs Encrypt and donât need manually get my cert working.
Im facing the issue that I now have 2 instances of nextcloud and cannot get the one which has all my configuration to show up at port 443.
Unter port 63222 I get my install on Version 19.0.0 (i just updated today)
On port 443 I get a totally different unconfigured version 18.0.4 howeverâŚ
Can anyone tell me how to get rif of the unconfigured instance and have my standard instance run on 443 instead of 63222?
I took a look at /var/www/nextcloud/config/config.php and /var/www/nextcloud/version.php and there it shows the correct 19.0.0 and I dont see other config files for a second instanceâŚ
Do you use Apache2 or Nginx? Search in the configuration â63222â and change it to â443â. Deactivate the old 443. Look at the paths in in your virutal webservers. With âcertbotâ normally the Bot uses the 80-apache2-configuration and add a 443-letsencrypt-apache2-configuration for the same paths. Perhaps you can first use port 80 for your old nextcloud-path and then use âcertbotâ.
Inside the config there is no port mentioned so I cannot change anything there.
I set up Letâs Encrypt via
sudo nextcloud.enable-https lets-encrypt
so no certbot as far as I know (i may be wrong though)
I had the port set in Webmin for apache virtual host but I changed that already.
But then I can only access the unconfigured âfreshâ instance on port 443âŚ
currently nowhere that is why Iâm confusedâŚ
I have port forwarding in my router (external 63222 to internal 63222 for this VM)
I have forwared 80 & 443 as well so Letâs Encrypt will work.
In Webmin I had the Port for my virutal server inside the Apache configuration set to 63222 but I changed that back to âdefaultâ.
Ok in this VM you use the port 63222.
Which software is in the VM installed: apache2?
Please search your apache2-configuration /etc/apache2/sites-available
Look also /etc/apache2/sites-available in the vm.
Post the list of files and search for listen ports.
ok inside /etc/apache2/sites-available/default-ssl.conf
there was the 63222 set which I now changed back to 443
No I cannot access the 63222 instance but only the default 18.0.4 which has no configâŚ
there is a nextcloud_tls_domain_self_signed.conf which seems to be my configuration with the correct directory and such but the default-ssl.conf seems to be the only one workingâŚ
If you habe two instances then you must have two different folders like /var/www/html/nextcloud and /var/www/html/nc , different tables in MariaDB and/or different VMs, ⌠Please post details.
I think for using 443 for the old 63222 instance you must configure the port forwarding to your vm new and correct e.g. 443:443 ??? But then you do not use the lets encrypt certificate. you must change it, too perhaps with âcertbotâ.
I found that inside of /etc/apache2/ports.conf 63222 was used instead of 443 but when I change those back apache service will not start up becuase of
Unit apache2.service has begun starting up.
nextcloud apachectl[2600]: (98)Address already in use: AH00072: make_sock: could not bind to address [::]:443
nextcloud apachectl[2600]: (98)Address already in use: AH00072: make_sock: could not bind to address 0.0.0.0:443
nextcloud apachectl[2600]: no listening sockets available, shutting down
nextcloud apachectl[2600]: AH00015: Unable to open logs
nextcloud apachectl[2600]: Action âstartâ failed.
nextcloud apachectl[2600]: The Apache error log may have more information.
nextcloud systemd[1]: apache2.service: Control process exited, code=exited status=1
nextcloud systemd[1]: apache2.service: Failed with result âexit-codeâ.
nextcloud systemd[1]: Failed to start The Apache HTTP Server.
as I am seeing âsnapâ in there could there be a second install of nextcloud on this VM? the one that comes preloaded from the VM and a âsnap Versionâ that got installed somehow? Maybe as I used nextcloud.enable-https lets-encrypt to setup Letâs encrypt? (I think there are 2 ways to get nextcloud to install)
name: nextcloud
summary: Nextcloud Server - A safe home for all your data
publisher: Nextcloudâ
store-url: Install nextcloud on Linux | Snap Store
contact: https://github.com/nextcloud/nextcloud-snap
license: unset
description: |
Where are your photos and documents? With Nextcloud you pick a server of your choice, at home, in
a data center or at a provider. And that is where your files will be. Nextcloud runs on that
server, protecting your data and giving you access from your desktop or mobile devices. Through
Nextcloud you also access, sync and share your existing data on that FTP drive at school, a
Dropbox or a NAS you have at home.
commands:
we are getting there I think
Next chrome & firefox tell me there is HSTS enabled and I cannot access the site since the certificate is back to the old one which is expired.
Perhaps you can configure apache2 to use first with http and not with https.
Does it work with http ? Delete or rename/deactivate/backup https configuration in apache2. Restart apache2.
If all fine and only http works, read the part for Lets Encrypt: