When I login at https://my-domain:8080/login/ as admin, I'm redirected to https://my-domain:8080/login/index.php, but page loads with error: This page isn’t working my-domain is currently unable to handle this request. HTTP ERROR 500 But when I refresh last url, I'm correctly redirected to admin page at https://my-domain:8080/index.php
Here are the logs from the moment of login: [Mon Jan 13 12:21:26.960934 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: PHP Fatal error: Uncaught TypeError: fwrite(): Argument #1 ($stream) must be of type resource, false given in /usr/local/ispconfig/interface/lib/app.inc.php:217, referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961071 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: Stack trace:, referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961089 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: #0 /usr/local/ispconfig/interface/lib/app.inc.php(217): fwrite(), referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961155 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: #1 /usr/local/ispconfig/interface/web/login/index.php(160): app->auth_log(), referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961171 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: #2 /usr/local/ispconfig/interface/web/login/index.php(459): process_login_request(), referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961186 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: #3 {main}, referer: https://my-domain:8080/login/ [Mon Jan 13 12:21:26.961229 2025] [fcgid:warn] [pid 347142:tid 281472601485600] [remote 192.168.31.222:38018] mod_fcgid: stderr: thrown in /usr/local/ispconfig/interface/lib/app.inc.php on line 217, referer: https://my-domain:8080/login/
There seems to be an issue when ISPConfig tries to write its log file. How did you install ISPConfig? Seems as if it is installed in a non-standard way or you altered folder permissions or paths in config files. That#s the file ISPConfig typically logs auth attempts Code: root@server1:~# ls -la /var/log/ispconfig/auth.log -rw-rw---- 1 ispconfig ispconfig 0 Jan 13 00:03 /var/log/ispconfig/auth.log and that#s how the log dir is set by default: Code: root@server1:~# grep ispconfig_log_dir /usr/local/ispconfig/interface/lib/config.inc.php $conf['ispconfig_log_dir'] = '/var/log/ispconfig'; define('ISPC_LOG_PATH', $conf['ispconfig_log_dir']); $conf['logpath'] = ISPC_LOG_PATH; // Actually just a copy of $conf['ispconfig_log_dir'], might be removed in a later version $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
I've installed ispconfig following automatic installation script guide located on howtoforge at https://www.howtoforge.com/ispconfi...tu/#download-centos-server-as-virtual-machine My permissions for /var/log/ispconfig folder were set for root user, I've changed them to www-data and chmoded to 755, but no luck.
Please change that back, you opened a security hole by doing that and nothing in ISPConfig uses www-data user anyway. root user is fine. What you can try is to create the auth log file: Code: touch /var/log/ispconfig/auth.log chown ispconfig:ispconfig /var/log/ispconfig/auth.log
Same 500 error. Here's my directory after changes: total 88K -rw-r--r-- 1 ispconfig ispconfig 0 Jan 13 13:08 auth.log -rw-r--r-- 1 root root 62K Jan 13 13:09 cron.log -rw-r--r-- 1 root root 4.0K Jan 13 00:00 cron.log.1.gz -rw-r--r-- 1 root root 350 Jan 12 10:41 cron.log.2.gz drwxr-xr-x 6 root root 4.0K Jan 12 15:56 httpd -rw-r--r-- 1 root root 112 Jan 13 12:29 ispconfig.log -rw-r--r-- 1 root root 125 Jan 13 00:00 ispconfig.log.1.gz
Yes, it's the same: $conf['ispconfig_log_dir'] = '/var/log/ispconfig'; define('ISPC_LOG_PATH', $conf['ispconfig_log_dir']); $conf['logpath'] = ISPC_LOG_PATH; // Actually just a copy of $conf['ispconfig_log_dir'], might be removed in a later version $conf['log_file'] = $conf['ispconfig_log_dir'].$conf['fs_div'].'ispconfig.log';
I have no idea why this happens on your system, I have not seen that on other systems, nor is it reproducible. Edit the file /usr/local/ispconfig/interface/lib/app.inc.php and change the function to write the auth.log around line 215 like this: Code: public function auth_log($msg) { $authlog_handle = fopen($this->_conf['ispconfig_log_dir'].'/auth.log', 'a'); if($authlog_handle) { fwrite($authlog_handle, $msg . PHP_EOL); fclose($authlog_handle); } } This at least prevents the 500 error if it can not open the log file.
Yes, I will add it in the next release. But as mentioned, it does not solve the underlying issue which I don't know, it just prevents PHP from issuing a 500 error.