Ispconfig new php version for nextcloud

Discussion in 'General' started by muekno, May 3, 2025.

Tags:
  1. muekno

    muekno Active Member HowtoForge Supporter

    I am on the latest ispconfig 3.3.p1
    One off my configured servers is a nextcloud instance 30.x.x running under PHP 8.1. But it complains PHP 8.1 ist outdated, I should use PHP 8.2. So I thought no problem set to installed PHP 8.2 in the nextcloud instance under sites and restart apache2. But then nextcloud complain internal error switch back to 8.1 everything runs fine again. What do I do wrong.
    Please help

    nextcloud complain "Einige Header sind in deiner Instanz nicht richtig eingestellt - Der `Strict-Transport-Security`-HTTP-Header ist nicht gesetzt (er sollte mindestens `15552000` Sekunden betragen). Für erhöhte Sicherheit wird empfohlen, HSTS zu aktivieren."

    No Idea where to configure in ISPConfig if possible there.
    help please
     
  2. till

    till Super Moderator Staff Member ISPConfig Developer

    Check website error.log to find out why Nextcloud does not work with that PHP version. And do not restart the web server manually, if needed, ISPConfig will restart it when you change the PHP version of a website.

    This is not PHP related, it's a header set by either Apache or Nginx.

    If you use Apache, you can set that header either in a .htaccess file or the Apache directives field on the options tab of the website.
    If you use Nginx, you can set this in the Nginx directives field on the options tab of the website.
     
    thisiszeev likes this.
  3. thisiszeev

    thisiszeev Member HowtoForge Supporter

    This paragraph in the Nextcloud Admin manual will help: https://docs.nextcloud.com/server/3...er.html#enable-http-strict-transport-security
     
  4. thisiszeev

    thisiszeev Member HowtoForge Supporter

    Just a word of caution when running Nextcloud through a hosting panel like ISPConfig or even cPanel.

    Nextcloud does not play nice with hosting panels.

    I would recommend you set it up on a vanilla server or vps. I have an install script that does a complete install similar to how ISPConfig has it's own automated installer.
     
  5. till

    till Super Moderator Staff Member ISPConfig Developer

    I agree, I would not run Nextcloud on an ISPConfig server directly. Instead, I would run it as Docker image on a separate port and then add a proxy configuration in the website in Apache/Nginx directives field to proxy traffic from that website to the Docker image.
     
  6. muekno

    muekno Active Member HowtoForge Supporter

    Not running netxcloud under ISPconfig my right, but I have it running since years without any problem on Debian 12 that I keep up to date, latest update this morning. i have updated nextcloud som times too. As I was behind a bit I decided to updates it too. So updated tis morning nextcloud from 27 to 28 (ok), 28 to 29 (ok), 29 to 30 (ok)
    With version 30 the warning came I should update to PHP 8.2 here the problem started.
    "
    Internal Server Error

    The server encountered an internal error and was unable to complete your request.
    Please contact the server administrator if this error reappears multiple times, please include the technical details below in your report.
    More details can be found in the server log."
    Can not see anything in the error log. Only the other_vhosts_access.log shows something relevant to nextcloud

    i.e.
    <code>
    nextcloud.muekno.de:443 62.54.177.160 - - [03/May/2025:14:10:43 +0200] "GET /index.php/204 HTTP/1.1" 500 5018 "-" "Mozilla/5.0 (Macintosh) mirall/3.16.4 (Nextcloud, macos-22.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
    nextcloud.muekno.de:443 62.146.82.66 - - [03/May/2025:14:11:38 +0200] "GET /apps/richdocuments/settings/fonts.json HTTP/1.1" 500 5058 "-" "COOLWSD HTTP Agent 24.04.13.3"
    nextcloud.muekno.de:443 62.54.177.160 - - [03/May/2025:14:11:45 +0200] "GET /index.php/204 HTTP/1.1" 500 5018 "-" "Mozilla/5.0 (Macintosh) mirall/3.16.4 (Nextcloud, macos-22.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
    nextcloud.muekno.de:443 62.54.177.160 - - [03/May/2025:14:11:45 +0200] "GET /index.php/204 HTTP/1.1" 500 5018 "-" "Mozilla/5.0 (Macintosh) mirall/3.16.4 (Nextcloud, macos-22.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
    nextcloud.muekno.de:443 62.54.177.160 - - [03/May/2025:14:11:45 +0200] "GET /status.php HTTP/1.1" 500 4707 "-" "Mozilla/5.0 (Macintosh) mirall/3.16.4 (Nextcloud, macos-22.6.0 ClientArchitecture: x86_64 OsArchitecture: x86_64)"
    </code>

    The nextcloud instance is just for may family at most for autoupload picture from our smartphones as backup.
    Changing the config is not easy, as it is running on my own server in a shared rack in a datacenter, and it is mail relay for me, mail server for customers, webserver for me and customers, primary DNS for half a dozend domains, everything managed by ISPConnfig.
    so running it on a separate server is not possible. I think too running as a not ISPConfig manged server beside the ISPConfig managed Webserver will be a problem.
    Otherwise runnig it with PHP 8.1 nextcloud works fine, but will get me in troubles with further updates
    Rainer

    Is it possible to move nextcloud to a docker instance and have it runninng beside ISPConfig
     
  7. muekno

    muekno Active Member HowtoForge Supporter

    Error solved php cli settings empty, filled out and it works.
    Bit my other questions still active
    Thanks
     
  8. muekno

    muekno Active Member HowtoForge Supporter

    NOT Solved, seamed I missed a refresh
     
  9. muekno

    muekno Active Member HowtoForge Supporter

    Double checkt system additional php versions and compare to these from PHP 8.1 for PHP 8.2 and PHP 8.3
    Nextcloud works still fine with 8.1 but with 8.2 and 8.3 I get a system error.
    Nothing meaning full to find in Apache logs
     
  10. muekno

    muekno Active Member HowtoForge Supporter

  11. pyte

    pyte Well-Known Member HowtoForge Supporter

    thisiszeev, till and muekno like this.
  12. thisiszeev

    thisiszeev Member HowtoForge Supporter

    I concur with @pyte ... the occ command is the most valuable tool for any NC administrator. I have even switched to doing my NC updates through occ.

    If you want to migrate your NC install to a Docker I can advise you as you go or assist directly. But my personal experience, bare metal install to a dedicated server or VPS gives you more control over everything.

    Main things you want to do is ensure everything is latest version, NC and Apps, then get your data files folder backed up, your apps folder backed up and your database backed up. Then install a fresh setup, copy apps folder, import database and copy data files folder (always best to keep data files in a folder outside your www path). Make sure that your config file has all the correct settings (domains, db etc) and then you should be able to log in and have it all running.

    If you want me to help you with a formal migration, let me know.

    I manage over four dozen active NC installs.

    And you welcome to use my installer script for free. It does everything, even configure PHP properly.
     
    muekno likes this.

Share This Page