Basis Einstellungen für lokale Installation

Basis Einstellungen für lokale Installation

Um die Seite per GIT zu "deployen" nehme ich Anpassungen an folgenden Dateien vor:

  • .htaccess
  • .gitignore
  • typo3conf/sites/sitename/config.yaml

Weiterhin erstelle ich Datei 

  • typo3conf/AdditionalConfiguration.php

Unabhängig von TYPO3, passe ich noch folgende Datei an

  • /etc/hosts

.htaccess

Da ich lokal kein SSL eingerichtet habe, schließe ich alle URLs, die mit local beginnen von dem https Redirect wie folge aus:

RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_HOST} !^localhost$ [NC]
RewriteCond %{HTTP_HOST} !^local\.* [NC]
RewriteRule (.*) %{HTTP_HOST}/$1[R=301,L]

Weiterhin definiere ich für alle URLs, die mit local beginnen die TYPO3_CONTEXT Variable auf "Development":

RewriteCond %{HTTP_HOST} ^local\.* [NC]
RewriteRule .? - [E=TYPO3_CONTEXT:Development]

.gitignore

/.env
/.idea
/typo3conf/deprecation_*.log
/typo3conf/ENABLE_INSTALL_TOOL
/FIRST_INSTALL
/typo3
/typo3_src
/typo3_src-*
/Packages
/index.php
/typo3temp/
/fileadmin/_processed_/
/fileadmin/_temp_/
/fileadmin/user_upload/_temp_/
/typo3conf/AdditionalConfiguration.php

typo3conf/sites/sitename/config.yaml

baseVariants:
  -
    base: 'http://local.domain.tld'
    condition: ‘applicationContext == "Development"’

typo3conf/AdditionalConfiguration.php

<?php
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['dbname'] = 'dbname';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['user'] = 'dbuser';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['password'] = 'pwd';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['host'] = '127.0.0.1';
$GLOBALS['TYPO3_CONF_VARS']['DB']['Connections']['Default']['port'] = '8889';


$GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromAddress'] = 'email@mail.de'; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['defaultMailFromName'] = 'Name'; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport'] = 'smtp'; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_encrypt'] = true; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_sendmail_command'] = '/usr/sbin/sendmail -t -i '; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_server'] = 'smtp-server'; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_password'] = 'email-pwd'; $GLOBALS['TYPO3_CONF_VARS']['MAIL']['transport_smtp_username'] = 'email-user';

/etc/hosts

hinzufügen:

127.0.0.1 local.domain.tld

Erstellt am: (aktualisiert am: )