[Solved] NextCloudPi - Changed Host IP will disable Websites

After Changing the Host IP Address, the NC and 4443 Website wont work anymore. In the config.php from NC, the new Host IP was successfully changed to the new IP. But the Apache or something else doesnt work anymore.
Is there a config or something else where i must Change the old IP?

If you manually changed the IP address, it still should work.

What is the output of

systemctl status apache2
systemctl status php7.0-fpm
systemctl status mysqld

and

sudo apache2ctl -S

edit: if you change the IP you can either reboot or type sudo systemctl start nextcloud-domain in order to make Nextcloud aware of the trusted domain. ncp-web should work all the same, but keep in mind that it is not accessible outside of your local network for security reasons.

systemctl status apache2
ā— apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-09-10 16:09:27 UTC; 15h ago
Process: 526 ExecStart=/usr/sbin/apachectl start (code=exited, status=1/FAILURE)

Sep 10 16:09:24 RaspiCloud systemd[1]: Starting The Apache HTTP Serverā€¦
Sep 10 16:09:27 RaspiCloud apachectl[526]: AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/ncp.conf:
Sep 10 16:09:27 RaspiCloud apachectl[526]: SSLCertificateFile: file ā€˜/etc/letsencrypt/live/***@***/fullchain.pemā€™ does not exist or is em
Sep 10 16:09:27 RaspiCloud apachectl[526]: Action ā€˜startā€™ failed.
Sep 10 16:09:27 RaspiCloud apachectl[526]: The Apache error log may have more information.
Sep 10 16:09:27 RaspiCloud systemd[1]: apache2.service: Control process exited, code=exited status=1
Sep 10 16:09:27 RaspiCloud systemd[1]: Failed to start The Apache HTTP Server.
Sep 10 16:09:27 RaspiCloud systemd[1]: apache2.service: Unit entered failed state.
Sep 10 16:09:27 RaspiCloud systemd[1]: apache2.service: Failed with result ā€˜exit-codeā€™.

systemctl status php7.0-fpm
ā— php7.0-fpm.service - The PHP 7.0 FastCGI Process Manager
Loaded: loaded (/lib/systemd/system/php7.0-fpm.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2017-09-10 16:09:28 UTC; 15h ago
Docs: man:php-fpm7.0(8)
Main PID: 518 (php-fpm7.0)
Status: "Processes active: 0, idle: 2, Requests: 0, slow: 0, Traffic: 0req/sec"
CGroup: /system.slice/php7.0-fpm.service
ā”œā”€518 php-fpm: master process (/etc/php/7.0/fpm/php-fpm.conf)
ā”œā”€814 php-fpm: pool www
ā””ā”€815 php-fpm: pool www

Sep 10 16:09:24 RaspiCloud systemd[1]: Starting The PHP 7.0 FastCGI Process Managerā€¦
Sep 10 16:09:28 RaspiCloud systemd[1]: Started The PHP 7.0 FastCGI Process Manager.

systemctl status mysqld
ā— mariadb.service - MariaDB database server
Loaded: loaded (/lib/systemd/system/mariadb.service; enabled; vendor preset: enabled)
Active: active (running) since Sun 2017-09-10 16:09:40 UTC; 15h ago
Process: 875 ExecStartPost=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 872 ExecStartPost=/etc/mysql/debian-start (code=exited, status=0/SUCCESS)
Process: 661 ExecStartPre=/bin/sleep 10 (code=exited, status=0/SUCCESS)
Process: 550 ExecStartPre=/bin/sh -c [ ! -e /usr/bin/galera_recovery ] && VAR= || VAR=/usr/bin/galera_recovery; [ $? -eq 0 ] && systemctl set-e
Process: 544 ExecStartPre=/bin/sh -c systemctl unset-environment _WSREP_START_POSITION (code=exited, status=0/SUCCESS)
Process: 520 ExecStartPre=/usr/bin/install -m 755 -o mysql -g root -d /var/run/mysqld (code=exited, status=0/SUCCESS)
Main PID: 843 (mysqld)
Status: "Taking your SQL requests nowā€¦"
CGroup: /system.slice/mariadb.service
ā””ā”€843 /usr/sbin/mysqld

Sep 10 16:09:24 RaspiCloud systemd[1]: Starting MariaDB database serverā€¦
Sep 10 16:09:37 RaspiCloud mysqld[843]: 2017-09-10 16:09:37 1988456448 [Note] /usr/sbin/mysqld (mysqld 10.1.23-MariaDB-9+deb9u1) starting as process 84
Sep 10 16:09:40 RaspiCloud systemd[1]: Started MariaDB database server.

sudo apache2ctl -S
AH00526: Syntax error on line 5 of /etc/apache2/sites-enabled/ncp.conf:
SSLCertificateFile: file ā€˜/etc/letsencrypt/live/***@***/fullchain.pemā€™ does not exist or is empty
Action ā€˜-Sā€™ failed.
The Apache error log may have more information.

Well it is something about the SSL / Letsencrpyt ā€¦ Hmpf :-/

Can i delete these Letsencrypt lines in the ncp.conf?

DocumentRoot /var/www/ncp-web
SSLEngine on
SSLCertificateFile /etc/letsencrypt/live/***@***/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/***@***/privkey.pem

Thatā€™s your problem, but I donā€™t see how this is related to changing the IP. You must have been doing other things?

You can modify those lines, or run letsencrypt again

u made my day NICE! :smiley:

Now the 4443 Site worksā€¦ I tried to get a certificate, but it failed with an ā€œACMEā€ Errorā€¦ So there is another error with letsencrypt :-/

The NCPi Website still wont work, and if i try ā€œhttps onlyā€ deactive/active, is still an error and ā€œSomething went wrong. Try refreshing the pageā€ :frowning:

The NCPi Website still wont work, and if i try ā€œhttps onlyā€ deactive/active, is still an error and ā€œSomething went wrong. Try refreshing the pageā€ :frowning:

That is a known issue that has to be fixed, but the command works even if it says it doesnā€™t

You need to have both ports 80 and 443 open in your home router. Thatā€™s probably why it failed

you mean the regular Nextcloud page (without the 4443)?

Thx for the nice Support and a very nice NextCloudPi Solution! :smiley:

yaaaaay.
pls mark this thread as solvedā€¦ :wink:

the bug has been fixed in v0.26.30. please, report if you find anything else