NC12 php 7.1.6 error 503

Hello everyone ! I am confronted with a problem for which, despite 2 days of research, I can’t find any solution.

I have update my dedicated server in debian 9 / php 7.1.6 and since that, my nextcloud shows me a 503 error, without error log (apache log empty, php log empty, .,. .)

I tried to reinstall completely nextcloud and the installation process (database etc …) works but once the configuration is executed => 503 error.

Will any of you have an idea to help me move forward on the problem? A suggestion peharps?
Any help would be appreciate :slight_smile:

Thx in advance!


Nextcloud version: 12.0.0
Operating system and version: Debian 9
Apache: Apache/2.4.25 (Debian)
PHP version: PHP 7.1.6

1 Like

Apache has an access and an error logfile. You can also set the logging behaviour in your apache config. Increase the log level, you should be able to get more detailed information about your 503 error.

When your hard disk/partition is full, log files can’t be written (happened to me once :slight_smile:)

Hi tflidd! Thank you for your answer.

I tried putting the highest log level on apache and still nothing. In access.log I have the error 503 which appears as many times as I try to refresh the page of the nextcloud. I checked but I have plenty of space available on the hard drive :slight_smile:
So for now I’m still stuck with this damn error 503 :frowning:


Can you post your config.php file please? It should have asked for this when you created the topic.

Are you behind a proxy?

Oups sorry, i forgot to put this!

$CONFIG = array (
‘instanceid’ => ‘ocbqcfcmjbnf’,
‘passwordsalt’ => ‘xxx/’,
‘secret’ => ‘xxx’,
‘trusted_domains’ =>
array (
0 => ‘’,
‘datadirectory’ => ‘/var/www/nextcloud/nextcloud_datas’,
‘overwrite.cli.url’ => ‘’,
‘dbtype’ => ‘mysql’,
‘version’ => ‘’,
‘dbname’ => ‘nextcloud’,
‘dbhost’ => ‘localhost’,
‘dbport’ => ‘’,
‘dbtableprefix’ => ‘oc_’,
‘dbuser’ => ‘xxx’,
‘dbpassword’ => ‘xxx’,
‘installed’ => true

Just to clarify, before the update of php and debian, it worked perfectly. I have not touched the configuration since.

Debian 9 comes already with php 7.1? If not, did you try the default packages?

Yes, debian 9 is under PHP 7.1.6-2 :slight_smile:

I will try on an older version of php, this is a good idea. This will ensure that it comes from php and nothing else.

Same thing with php 7.0 :frowning: so i think the problem come from my server but any clue at the moment. If you have any idea… i take!
(no more error log with php 7.0)

Server works with php fpm, so yes there is a proxy :slight_smile:

In the APACHE vhost :
ProxyPassMatch ^/(..php(/.)?)$ fcgi://$1

Just in addition, on this same server I have prestashop and phpmyadmin which work without any problem, with almost similar vhosts and on php 7.1 in the same way.

503 is internal server error and should leave a message in some log.

I agree with that but unfortunately I have no log that is filled.
If on another site, I voluntarily causes a 503 I have a log, but not in the case of nextcloud and I can not find an explanation.

On apache, the default setup uses mod_php. All other modules are a bit problematic and unfortunately we don’t have a default configuration you can test. There were several issues over the time but I don’t know if anybody managed to set up a fully working NC.

You can as well use nginx for a smaller footprint where default configs are available.

Instead of put ProxyPassMatch ^/(…php(/.)?)$ fcgi://$1 in my apache vhost, i need to put
<FilesMatch ^(.+\.php)(/.+)$> SetHandler "proxy:fcgi://localhost:9000/" </FilesMatch>

And now everything is ok :smile:

I will finally enjoy the sun! :wink:

I have it working with:

<FilesMatch \.php$>
   SetHandler "proxy:unix:/run/php-fpm.sock|fcgi://localhost"
1 Like