Error 503 after migration to new server

Support intro

Sorry to hear you’re facing problems :slight_frown:

If you’re urgently looking for support to keep your business running, consider checking out our paid support options.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Remember, the below information may be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Please delete everything above when creating your topic, just provide the following:

Nextcloud version (eg, 12.0.2): 12.0.4.3
Operating system and version (eg, Ubuntu 17.04): raspberrypi 4.9.59-v7
Apache or nginx version (eg, Apache 2.4.25): Apache 2.4.25-3+deb9u3
PHP version (eg, 7.1): php 7.0

The issue you are facing: Error 503 after migration to new server

Is this the first time you’ve seen this error? (Y/N): y

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

<?php
$CONFIG = array (
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => '',
    1 => '',
    2 => '',
  ),
  'datadirectory' => '/var/www/clients/client0/web1/web/data',
  'overwrite.cli.url' => 'http://xyx.com',
  'dbtype' => 'mysql',
  'version' => '12.0.4.3',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost',
  'dbport' => '',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'dbtableprefix' => 'oc_',
  'dbuser' => '',
  'dbpassword' => '',
  'logtimezone' => 'UTC',
  'installed' => true,
  'appstore.experimental.enabled' => true,
  'maintenance' => false,
  'mail_from_address' => 'nextcloud',
  'mail_smtpmode' => 'php',
  'mail_domain' => 'xyx.com',
  'mail_smtpsecure' => 'tls',
  'mail_smtphost' => 'r',
  'loglevel' => 2,
  'theme' => '',
  'updater.release.channel' => 'stable',
);

Hello, I have to migrate my web server to new SD card because of card corruption. On new server I used MiniBian on old was user standard RaspberryOS. Also on new server is used PHP7, on old was PHP5.
On new server I have without problems running two Wordpress domains and Roundcube.

Nextcloud is giving me error 503, with clean Apache logs (in debug level).

Here is my apache configuration:

<Directory /var/www/xyx.com>
		AllowOverride None
				Require all denied
		</Directory>

<VirtualHost *:80>

									DocumentRoot /var/www/xyx.com/web
						
		ServerName xyx.com
		ServerAlias www.xyx.com
		ServerAdmin webmaster@xyx.com

		ErrorLog /var/log/ispconfig/httpd/xyx.com/error.log

		Alias /error/ "/var/www/xyx.com/web/error/"
		ErrorDocument 400 /error/400.html
		ErrorDocument 401 /error/401.html
		ErrorDocument 403 /error/403.html
		ErrorDocument 404 /error/404.html
		ErrorDocument 405 /error/405.html
		ErrorDocument 500 /error/500.html
		ErrorDocument 502 /error/502.html
		ErrorDocument 503 /error/503.html

		<IfModule mod_ssl.c>
		</IfModule>

		<Directory /var/www/xyx.com/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
				
				# ssi enabled
				AddType text/html .shtml
				AddOutputFilter INCLUDES .shtml
				Options +Includes
		</Directory>
		<Directory /var/www/clients/client0/web1/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
				
				# ssi enabled
				AddType text/html .shtml
				AddOutputFilter INCLUDES .shtml
				Options +Includes
		</Directory>

		<IfModule mod_ruby.c>
			<Directory /var/www/xyx.com/web>
				Options +ExecCGI
			</Directory>
			RubyRequire apache/ruby-run
			#RubySafeLevel 0
			AddType text/html .rb
			AddType text/html .rbx
			<Files *.rb>
				SetHandler ruby-object
				RubyHandler Apache::RubyRun.instance
			</Files>
			<Files *.rbx>
				SetHandler ruby-object
				RubyHandler Apache::RubyRun.instance
			</Files>
		</IfModule>

		<IfModule mod_perl.c>
			PerlModule ModPerl::Registry
			PerlModule Apache2::Reload
			<Directory /var/www/xyx.com/web>
				PerlResponseHandler ModPerl::Registry
				PerlOptions +ParseHeaders
				Options +ExecCGI
			</Directory>
			<Directory /var/www/clients/client0/web1/web>
				PerlResponseHandler ModPerl::Registry
				PerlOptions +ParseHeaders
				Options +ExecCGI
			</Directory>
            <Files *.pl>
				SetHandler perl-script
            </Files>
		</IfModule>

		<IfModule mod_python.c>
			<Directory /var/www/clients/client0/web1/web>
				<FilesMatch "\.py$">
					SetHandler mod_python
				</FilesMatch>
				PythonHandler mod_python.publisher
				PythonDebug On
			</Directory>
		</IfModule>

		# cgi enabled
	<Directory /var/www/clients/client0/web1/cgi-bin>
						Require all granted
					</Directory>
		ScriptAlias  /cgi-bin/ /var/www/clients/client0/web1/cgi-bin/
		<FilesMatch "\.(cgi|pl)$">
			SetHandler cgi-script
		</FilesMatch>
		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web1 client0
		</IfModule>
		# mod_php enabled
		AddType application/x-httpd-php .php .php3 .php4 .php5
		SetEnv TMP /var/www/clients/client0/web1/tmp
		SetEnv TMPDIR /var/www/clients/client0/web1/tmp
		SetEnv TEMP /var/www/clients/client0/web1/tmp
		php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@xyx.com"
		php_admin_value upload_tmp_dir /var/www/clients/client0/web1/tmp
		php_admin_value session.save_path /var/www/clients/client0/web1/tmp
	# PHPIniDir /var/www/conf/web1
		php_admin_value open_basedir /var/www/clients/client0/web1/web:/var/www/clients/client0/web1/private:/var/www/clients/client0/web1/tmp:/var/www/xyx.com/web:/srv/www/xyx.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom



		# add support for apache mpm_itk
		<IfModule mpm_itk_module>
			AssignUserId web1 client0
		</IfModule>

		<IfModule mod_dav_fs.c>
		# Do not execute PHP files in webdav directory
			<Directory /var/www/clients/client0/web1/webdav>
				<ifModule mod_security2.c>
					SecRuleRemoveById 960015
					SecRuleRemoveById 960032
				</ifModule>
				<FilesMatch "\.ph(p3?|tml)$">
					SetHandler None
				</FilesMatch>
			</Directory>
			DavLockDB /var/www/clients/client0/web1/tmp/DavLock
			# DO NOT REMOVE THE COMMENTS!
			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
			# WEBDAV END
		</IfModule>



</VirtualHost>


<VirtualHost *:443>

									DocumentRoot /var/www/xyx.com/web
						
		ServerName xyx.com
		ServerAlias www.xyx.com
		ServerAdmin webmaster@xyx.com

		ErrorLog /var/log/ispconfig/httpd/xyx.com/error.log

		Alias /error/ "/var/www/xyx.com/web/error/"
		ErrorDocument 400 /error/400.html
		ErrorDocument 401 /error/401.html
		ErrorDocument 403 /error/403.html
		ErrorDocument 404 /error/404.html
		ErrorDocument 405 /error/405.html
		ErrorDocument 500 /error/500.html
		ErrorDocument 502 /error/502.html
		ErrorDocument 503 /error/503.html

		<IfModule mod_ssl.c>
		SSLEngine on
		SSLProtocol All -SSLv2 -SSLv3
		# SSLCipherSuite          ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256:ECDHE-ECDSA-AES128-SHA:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA:ECDHE-ECDSA-AES256-SHA384:ECDHE-ECDSA-AES256-SHA:ECDHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA256:DHE-RSA-AES128-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES256-SHA:ECDHE-ECDSA-DES-CBC3-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES128-GCM-SHA256:AES256-GCM-SHA384:AES128-SHA256:AES256-SHA256:AES128-SHA:AES256-SHA:DES-CBC3-SHA:!DSS
		SSLHonorCipherOrder     on
		# <IfModule mod_headers.c>
		# Header always add Strict-Transport-Security "max-age=15768000"
		# </IfModule>
		SSLCertificateFile /var/www/clients/client0/web1/ssl/xyx.com-le.crt
		SSLCertificateKeyFile /var/www/clients/client0/web1/ssl/xyx.com-le.key
				SSLCertificateChainFile /var/www/clients/client0/web1/ssl/xyx.com-le.bundle
						SSLUseStapling on
		SSLStaplingResponderTimeout 5
		SSLStaplingReturnResponderErrors off
				</IfModule>

		<Directory /var/www/xyx.com/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
						Require all granted
				
				# ssi enabled
				AddType text/html .shtml
				AddOutputFilter INCLUDES .shtml
				Options +Includes
		</Directory>
		<Directory /var/www/clients/client0/web1/web>
				# Clear PHP settings of this website
				<FilesMatch ".+\.ph(p[345]?|t|tml)$">
						SetHandler None
				</FilesMatch>
				Options +FollowSymLinks
				AllowOverride All
								Require all granted
				
				# ssi enabled
				AddType text/html .shtml
				AddOutputFilter INCLUDES .shtml
				Options +Includes
		</Directory>

		<IfModule mod_ruby.c>
			<Directory /var/www/xyx.com/web>
				Options +ExecCGI
			</Directory>
			RubyRequire apache/ruby-run
			#RubySafeLevel 0
			AddType text/html .rb
			AddType text/html .rbx
			<Files *.rb>
				SetHandler ruby-object
				RubyHandler Apache::RubyRun.instance
			</Files>
			<Files *.rbx>
				SetHandler ruby-object
				RubyHandler Apache::RubyRun.instance
			</Files>
		</IfModule>

		<IfModule mod_perl.c>
			PerlModule ModPerl::Registry
			PerlModule Apache2::Reload
			<Directory /var/www/xyx.com/web>
				PerlResponseHandler ModPerl::Registry
				PerlOptions +ParseHeaders
				Options +ExecCGI
			</Directory>
			<Directory /var/www/clients/client0/web1/web>
				PerlResponseHandler ModPerl::Registry
				PerlOptions +ParseHeaders
				Options +ExecCGI
			</Directory>
            <Files *.pl>
				SetHandler perl-script
            </Files>
		</IfModule>

		<IfModule mod_python.c>
			<Directory /var/www/clients/client0/web1/web>
				<FilesMatch "\.py$">
					SetHandler mod_python
				</FilesMatch>
				PythonHandler mod_python.publisher
				PythonDebug On
			</Directory>
		</IfModule>

		# cgi enabled
	<Directory /var/www/clients/client0/web1/cgi-bin>
						Require all granted
					</Directory>
		ScriptAlias  /cgi-bin/ /var/www/clients/client0/web1/cgi-bin/
		<FilesMatch "\.(cgi|pl)$">
			SetHandler cgi-script
		</FilesMatch>
		# suexec enabled
		<IfModule mod_suexec.c>
			SuexecUserGroup web1 client0
		</IfModule>
		# mod_php enabled
		AddType application/x-httpd-php .php .php3 .php4 .php5
		SetEnv TMP /var/www/clients/client0/web1/tmp
		SetEnv TMPDIR /var/www/clients/client0/web1/tmp
		SetEnv TEMP /var/www/clients/client0/web1/tmp
		php_admin_value sendmail_path "/usr/sbin/sendmail -t -i -fwebmaster@xyx.com"
		php_admin_value upload_tmp_dir /var/www/clients/client0/web1/tmp
		php_admin_value session.save_path /var/www/clients/client0/web1/tmp
	# PHPIniDir /var/www/conf/web1
		php_admin_value open_basedir /var/www/clients/client0/web1/web:/var/www/clients/client0/web1/private:/var/www/clients/client0/web1/tmp:/var/www/xyx.com/web:/srv/www/xyx.com/web:/usr/share/php5:/usr/share/php:/tmp:/usr/share/phpmyadmin:/etc/phpmyadmin:/var/lib/phpmyadmin:/dev/random:/dev/urandom



		# add support for apache mpm_itk
		<IfModule mpm_itk_module>
			AssignUserId web1 client0
		</IfModule>

		<IfModule mod_dav_fs.c>
		# Do not execute PHP files in webdav directory
			<Directory /var/www/clients/client0/web1/webdav>
				<ifModule mod_security2.c>
					SecRuleRemoveById 960015
					SecRuleRemoveById 960032
				</ifModule>
				<FilesMatch "\.ph(p3?|tml)$">
					SetHandler None
				</FilesMatch>
			</Directory>
			DavLockDB /var/www/clients/client0/web1/tmp/DavLock
			# DO NOT REMOVE THE COMMENTS!
			# IF YOU REMOVE THEM, WEBDAV WILL NOT WORK ANYMORE!
      # WEBDAV BEGIN
			# WEBDAV END
		</IfModule>



</VirtualHost>

<IfModule mod_ssl.c>
        SSLStaplingCache shmcb:/var/run/ocsp(128000)
</IfModule>

I try with new installation and get the same error on installer!

Thanks for any help.