Connect to the staging server

Connect to using your credentials.

Create a SSL certificate

We need an SSL certificate, so that the new staging website is accessible using HTTPS.

To do so please create a new certificate (make sure to replace {sitename} with the name of the site)

sudo letsencrypt certonly --webroot -w /var/www/html -d {sitename}

This will issue a certificate for {sitename} The certificate will get renewed automatically.

Add apache configuration file

To have the Apache webserver respond correctly to requests made to {sitename} we need to configure it. We create an apache configuration file 

sudo nano /etc/apache2/sites-available/{sitename}

and paste the following content:

<IfModule mod_ssl.c>
	<VirtualHost *:443>
		ServerName {sitename}
		ServerAdmin [email protected]

		DocumentRoot /var/www/deployments/{sitename}

		ErrorLogFormat "[%t] [%l] [pid %P] %F: %E: %M"
		ErrorLog ${APACHE_LOG_DIR}/{sitename} 
		CustomLog ${APACHE_LOG_DIR}/{sitename} "%u %t \"%r\" %>s %b"

		SetEnv TYPO3_CONTEXT Development
		SetEnv HOSTNAME {sitename}

		SSLEngine on

		SSLCertificateFile      /etc/letsencrypt/live/{sitename}
		SSLCertificateKeyFile /etc/letsencrypt/live/{sitename}
		SSLCertificateChainFile /etc/letsencrypt/live/{sitename}

		<Directory /var/www/deployments/{sitename}>
			AllowOverride All
			Options Includes FollowSymLinks MultiViews

			AuthType Basic
			AuthName "Login"
			AuthUserFile /var/www/.htusers
			SetEnvIfNoCase User-Agent .*Google Page Speed Insights* AllowedUserAgent
			# Define proceeding
			Order deny,allow
			Deny from all
			Require valid-user
			Allow from env=AllowedUserAgent
			Satisfy Any

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


Enable and activate the new site

Tell apache to enable the new site

sudo a2ensite {sitename}

To activate the new apache configuration we need to restart the Apache webesrver gracefully

sudo service apache2 graceful



The new staging site is now live at:


And will show content from the folder 


All that we need to now do is

  • configure automatic deployment, so that our code changes get pushed here 
  • copy the static files (fileadmin etc)
  • set up mySQL database
  • configure AdditionalConfiguration.php to use the database