Add TYPO3 setup using DDEV
This commit is contained in:
commit
a19919ad14
8 changed files with 7746 additions and 0 deletions
284
.ddev/config.yaml
Normal file
284
.ddev/config.yaml
Normal file
|
@ -0,0 +1,284 @@
|
|||
name: kaderli.dev
|
||||
type: typo3
|
||||
docroot: public
|
||||
php_version: "8.3"
|
||||
webserver_type: nginx-fpm
|
||||
xdebug_enabled: false
|
||||
additional_hostnames: []
|
||||
additional_fqdns: []
|
||||
database:
|
||||
type: postgres
|
||||
version: "17"
|
||||
use_dns_when_possible: true
|
||||
composer_version: "2"
|
||||
web_environment:
|
||||
- TYPO3_CONTEXT=Development
|
||||
corepack_enable: false
|
||||
|
||||
# Key features of DDEV's config.yaml:
|
||||
|
||||
# name: <projectname> # Name of the project, automatically provides
|
||||
# http://projectname.ddev.site and https://projectname.ddev.site
|
||||
|
||||
# type: <projecttype> # backdrop, craftcms, django4, drupal, drupal6, drupal7, laravel, magento, magento2, php, python, shopware6, silverstripe, typo3, wordpress
|
||||
# See https://ddev.readthedocs.io/en/stable/users/quickstart/ for more
|
||||
# information on the different project types
|
||||
# "drupal" covers recent Drupal 8+
|
||||
|
||||
# docroot: <relative_path> # Relative path to the directory containing index.php.
|
||||
|
||||
# php_version: "8.2" # PHP version to use, "5.6", "7.0", "7.1", "7.2", "7.3", "7.4", "8.0", "8.1", "8.2", "8.3", "8.4"
|
||||
|
||||
# You can explicitly specify the webimage but this
|
||||
# is not recommended, as the images are often closely tied to DDEV's' behavior,
|
||||
# so this can break upgrades.
|
||||
|
||||
# webimage: <docker_image> # nginx/php docker image.
|
||||
|
||||
# database:
|
||||
# type: <dbtype> # mysql, mariadb, postgres
|
||||
# version: <version> # database version, like "10.11" or "8.0"
|
||||
# MariaDB versions can be 5.5-10.8, 10.11, and 11.4.
|
||||
# MySQL versions can be 5.5-8.0.
|
||||
# PostgreSQL versions can be 9-17.
|
||||
|
||||
# router_http_port: <port> # Port to be used for http (defaults to global configuration, usually 80)
|
||||
# router_https_port: <port> # Port for https (defaults to global configuration, usually 443)
|
||||
|
||||
# xdebug_enabled: false # Set to true to enable Xdebug and "ddev start" or "ddev restart"
|
||||
# Note that for most people the commands
|
||||
# "ddev xdebug" to enable Xdebug and "ddev xdebug off" to disable it work better,
|
||||
# as leaving Xdebug enabled all the time is a big performance hit.
|
||||
|
||||
# xhprof_enabled: false # Set to true to enable Xhprof and "ddev start" or "ddev restart"
|
||||
# Note that for most people the commands
|
||||
# "ddev xhprof" to enable Xhprof and "ddev xhprof off" to disable it work better,
|
||||
# as leaving Xhprof enabled all the time is a big performance hit.
|
||||
|
||||
# webserver_type: nginx-fpm, apache-fpm, or nginx-gunicorn
|
||||
|
||||
# timezone: Europe/Berlin
|
||||
# If timezone is unset, DDEV will attempt to derive it from the host system timezone
|
||||
# using the $TZ environment variable or the /etc/localtime symlink.
|
||||
# This is the timezone used in the containers and by PHP;
|
||||
# it can be set to any valid timezone,
|
||||
# see https://en.wikipedia.org/wiki/List_of_tz_database_time_zones
|
||||
# For example Europe/Dublin or MST7MDT
|
||||
|
||||
# composer_root: <relative_path>
|
||||
# Relative path to the Composer root directory from the project root. This is
|
||||
# the directory which contains the composer.json and where all Composer related
|
||||
# commands are executed.
|
||||
|
||||
# composer_version: "2"
|
||||
# You can set it to "" or "2" (default) for Composer v2 or "1" for Composer v1
|
||||
# to use the latest major version available at the time your container is built.
|
||||
# It is also possible to use each other Composer version channel. This includes:
|
||||
# - 2.2 (latest Composer LTS version)
|
||||
# - stable
|
||||
# - preview
|
||||
# - snapshot
|
||||
# Alternatively, an explicit Composer version may be specified, for example "2.2.18".
|
||||
# To reinstall Composer after the image was built, run "ddev debug rebuild".
|
||||
|
||||
# nodejs_version: "20"
|
||||
# change from the default system Node.js version to any other version.
|
||||
# See https://ddev.readthedocs.io/en/stable/users/configuration/config/#nodejs_version for more information
|
||||
# and https://www.npmjs.com/package/n#specifying-nodejs-versions for the full documentation,
|
||||
# Note that using of 'ddev nvm' is discouraged because "nodejs_version" is much easier to use,
|
||||
# can specify any version, and is more robust than using 'nvm'.
|
||||
|
||||
# corepack_enable: false
|
||||
# Change to 'true' to 'corepack enable' and gain access to latest versions of yarn/pnpm
|
||||
|
||||
# additional_hostnames:
|
||||
# - somename
|
||||
# - someothername
|
||||
# would provide http and https URLs for "somename.ddev.site"
|
||||
# and "someothername.ddev.site".
|
||||
|
||||
# additional_fqdns:
|
||||
# - example.com
|
||||
# - sub1.example.com
|
||||
# would provide http and https URLs for "example.com" and "sub1.example.com"
|
||||
# Please take care with this because it can cause great confusion.
|
||||
|
||||
# upload_dirs: "custom/upload/dir"
|
||||
#
|
||||
# upload_dirs:
|
||||
# - custom/upload/dir
|
||||
# - ../private
|
||||
#
|
||||
# would set the destination paths for ddev import-files to <docroot>/custom/upload/dir
|
||||
# When Mutagen is enabled this path is bind-mounted so that all the files
|
||||
# in the upload_dirs don't have to be synced into Mutagen.
|
||||
|
||||
# disable_upload_dirs_warning: false
|
||||
# If true, turns off the normal warning that says
|
||||
# "You have Mutagen enabled and your 'php' project type doesn't have upload_dirs set"
|
||||
|
||||
# ddev_version_constraint: ""
|
||||
# Example:
|
||||
# ddev_version_constraint: ">= 1.22.4"
|
||||
# This will enforce that the running ddev version is within this constraint.
|
||||
# See https://github.com/Masterminds/semver#checking-version-constraints for
|
||||
# supported constraint formats
|
||||
|
||||
# working_dir:
|
||||
# web: /var/www/html
|
||||
# db: /home
|
||||
# would set the default working directory for the web and db services.
|
||||
# These values specify the destination directory for ddev ssh and the
|
||||
# directory in which commands passed into ddev exec are run.
|
||||
|
||||
# omit_containers: [db, ddev-ssh-agent]
|
||||
# Currently only these containers are supported. Some containers can also be
|
||||
# omitted globally in the ~/.ddev/global_config.yaml. Note that if you omit
|
||||
# the "db" container, several standard features of DDEV that access the
|
||||
# database container will be unusable. In the global configuration it is also
|
||||
# possible to omit ddev-router, but not here.
|
||||
|
||||
# performance_mode: "global"
|
||||
# DDEV offers performance optimization strategies to improve the filesystem
|
||||
# performance depending on your host system. Should be configured globally.
|
||||
#
|
||||
# If set, will override the global config. Possible values are:
|
||||
# - "global": uses the value from the global config.
|
||||
# - "none": disables performance optimization for this project.
|
||||
# - "mutagen": enables Mutagen for this project.
|
||||
# - "nfs": enables NFS for this project.
|
||||
#
|
||||
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#nfs
|
||||
# See https://ddev.readthedocs.io/en/stable/users/install/performance/#mutagen
|
||||
|
||||
# fail_on_hook_fail: False
|
||||
# Decide whether 'ddev start' should be interrupted by a failing hook
|
||||
|
||||
# host_https_port: "59002"
|
||||
# The host port binding for https can be explicitly specified. It is
|
||||
# dynamic unless otherwise specified.
|
||||
# This is not used by most people, most people use the *router* instead
|
||||
# of the localhost port.
|
||||
|
||||
# host_webserver_port: "59001"
|
||||
# The host port binding for the ddev-webserver can be explicitly specified. It is
|
||||
# dynamic unless otherwise specified.
|
||||
# This is not used by most people, most people use the *router* instead
|
||||
# of the localhost port.
|
||||
|
||||
# host_db_port: "59002"
|
||||
# The host port binding for the ddev-dbserver can be explicitly specified. It is dynamic
|
||||
# unless explicitly specified.
|
||||
|
||||
# mailpit_http_port: "8025"
|
||||
# mailpit_https_port: "8026"
|
||||
# The Mailpit ports can be changed from the default 8025 and 8026
|
||||
|
||||
# host_mailpit_port: "8025"
|
||||
# The mailpit port is not normally bound on the host at all, instead being routed
|
||||
# through ddev-router, but it can be bound directly to localhost if specified here.
|
||||
|
||||
# webimage_extra_packages: [php7.4-tidy, php-bcmath]
|
||||
# Extra Debian packages that are needed in the webimage can be added here
|
||||
|
||||
# dbimage_extra_packages: [telnet,netcat]
|
||||
# Extra Debian packages that are needed in the dbimage can be added here
|
||||
|
||||
# use_dns_when_possible: true
|
||||
# If the host has internet access and the domain configured can
|
||||
# successfully be looked up, DNS will be used for hostname resolution
|
||||
# instead of editing /etc/hosts
|
||||
# Defaults to true
|
||||
|
||||
# project_tld: ddev.site
|
||||
# The top-level domain used for project URLs
|
||||
# The default "ddev.site" allows DNS lookup via a wildcard
|
||||
# If you prefer you can change this to "ddev.local" to preserve
|
||||
# pre-v1.9 behavior.
|
||||
|
||||
# ngrok_args: --basic-auth username:pass1234
|
||||
# Provide extra flags to the "ngrok http" command, see
|
||||
# https://ngrok.com/docs/ngrok-agent/config or run "ngrok http -h"
|
||||
|
||||
# disable_settings_management: false
|
||||
# If true, DDEV will not create CMS-specific settings files like
|
||||
# Drupal's settings.php/settings.ddev.php or TYPO3's additional.php
|
||||
# In this case the user must provide all such settings.
|
||||
|
||||
# You can inject environment variables into the web container with:
|
||||
# web_environment:
|
||||
# - SOMEENV=somevalue
|
||||
# - SOMEOTHERENV=someothervalue
|
||||
|
||||
# no_project_mount: false
|
||||
# (Experimental) If true, DDEV will not mount the project into the web container;
|
||||
# the user is responsible for mounting it manually or via a script.
|
||||
# This is to enable experimentation with alternate file mounting strategies.
|
||||
# For advanced users only!
|
||||
|
||||
# bind_all_interfaces: false
|
||||
# If true, host ports will be bound on all network interfaces,
|
||||
# not the localhost interface only. This means that ports
|
||||
# will be available on the local network if the host firewall
|
||||
# allows it.
|
||||
|
||||
# default_container_timeout: 120
|
||||
# The default time that DDEV waits for all containers to become ready can be increased from
|
||||
# the default 120. This helps in importing huge databases, for example.
|
||||
|
||||
#web_extra_exposed_ports:
|
||||
#- name: nodejs
|
||||
# container_port: 3000
|
||||
# http_port: 2999
|
||||
# https_port: 3000
|
||||
#- name: something
|
||||
# container_port: 4000
|
||||
# https_port: 4000
|
||||
# http_port: 3999
|
||||
# Allows a set of extra ports to be exposed via ddev-router
|
||||
# Fill in all three fields even if you don’t intend to use the https_port!
|
||||
# If you don’t add https_port, then it defaults to 0 and ddev-router will fail to start.
|
||||
#
|
||||
# The port behavior on the ddev-webserver must be arranged separately, for example
|
||||
# using web_extra_daemons.
|
||||
# For example, with a web app on port 3000 inside the container, this config would
|
||||
# expose that web app on https://<project>.ddev.site:9999 and http://<project>.ddev.site:9998
|
||||
# web_extra_exposed_ports:
|
||||
# - name: myapp
|
||||
# container_port: 3000
|
||||
# http_port: 9998
|
||||
# https_port: 9999
|
||||
|
||||
#web_extra_daemons:
|
||||
#- name: "http-1"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server -p 3000"
|
||||
# directory: /var/www/html
|
||||
#- name: "http-2"
|
||||
# command: "/var/www/html/node_modules/.bin/http-server /var/www/html/sub -p 3000"
|
||||
# directory: /var/www/html
|
||||
|
||||
# override_config: false
|
||||
# By default, config.*.yaml files are *merged* into the configuration
|
||||
# But this means that some things can't be overridden
|
||||
# For example, if you have 'use_dns_when_possible: true'' you can't override it with a merge
|
||||
# and you can't erase existing hooks or all environment variables.
|
||||
# However, with "override_config: true" in a particular config.*.yaml file,
|
||||
# 'use_dns_when_possible: false' can override the existing values, and
|
||||
# hooks:
|
||||
# post-start: []
|
||||
# or
|
||||
# web_environment: []
|
||||
# or
|
||||
# additional_hostnames: []
|
||||
# can have their intended affect. 'override_config' affects only behavior of the
|
||||
# config.*.yaml file it exists in.
|
||||
|
||||
# Many DDEV commands can be extended to run tasks before or after the
|
||||
# DDEV command is executed, for example "post-start", "post-import-db",
|
||||
# "pre-composer", "post-composer"
|
||||
# See https://ddev.readthedocs.io/en/stable/users/extend/custom-commands/ for more
|
||||
# information on the commands that can be extended and the tasks you can define
|
||||
# for them. Example:
|
||||
#hooks:
|
||||
# post-start:
|
||||
# - exec: composer install -d /var/www/html
|
8
.gitignore
vendored
Normal file
8
.gitignore
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
.DS_Store
|
||||
.idea
|
||||
nbproject
|
||||
/var/*
|
||||
!/var/labels
|
||||
/vendor
|
||||
/public/*
|
||||
!/public/.htaccess
|
4
README.md
Normal file
4
README.md
Normal file
|
@ -0,0 +1,4 @@
|
|||
# kaderli.dev
|
||||
|
||||
## Development
|
||||
`ddev start`
|
43
composer.json
Normal file
43
composer.json
Normal file
|
@ -0,0 +1,43 @@
|
|||
{
|
||||
"name": "typo3/cms-base-distribution",
|
||||
"description" : "TYPO3 CMS Base Distribution",
|
||||
"license": "GPL-2.0-or-later",
|
||||
"type": "project",
|
||||
"config": {
|
||||
"allow-plugins": {
|
||||
"typo3/class-alias-loader": true,
|
||||
"typo3/cms-composer-installers": true
|
||||
},
|
||||
"platform": {
|
||||
"php": "8.2.0"
|
||||
},
|
||||
"sort-packages": true
|
||||
},
|
||||
"require": {
|
||||
"typo3/cms-backend": "^13.4",
|
||||
"typo3/cms-belog": "^13.4",
|
||||
"typo3/cms-beuser": "^13.4",
|
||||
"typo3/cms-core": "^13.4",
|
||||
"typo3/cms-dashboard": "^13.4",
|
||||
"typo3/cms-extbase": "^13.4",
|
||||
"typo3/cms-extensionmanager": "^13.4",
|
||||
"typo3/cms-felogin": "^13.4",
|
||||
"typo3/cms-filelist": "^13.4",
|
||||
"typo3/cms-fluid": "^13.4",
|
||||
"typo3/cms-fluid-styled-content": "^13.4",
|
||||
"typo3/cms-form": "^13.4",
|
||||
"typo3/cms-frontend": "^13.4",
|
||||
"typo3/cms-impexp": "^13.4",
|
||||
"typo3/cms-info": "^13.4",
|
||||
"typo3/cms-install": "^13.4",
|
||||
"typo3/cms-reactions": "^13.4",
|
||||
"typo3/cms-recycler": "^13.4",
|
||||
"typo3/cms-rte-ckeditor": "^13.4",
|
||||
"typo3/cms-seo": "^13.4",
|
||||
"typo3/cms-setup": "^13.4",
|
||||
"typo3/cms-sys-note": "^13.4",
|
||||
"typo3/cms-tstemplate": "^13.4",
|
||||
"typo3/cms-viewpage": "^13.4",
|
||||
"typo3/cms-webhooks": "^13.4"
|
||||
}
|
||||
}
|
6886
composer.lock
generated
Normal file
6886
composer.lock
generated
Normal file
File diff suppressed because it is too large
Load diff
16
config/sites/main/config.yaml
Normal file
16
config/sites/main/config.yaml
Normal file
|
@ -0,0 +1,16 @@
|
|||
base: 'https://kaderli.dev'
|
||||
baseVariants:
|
||||
-
|
||||
base: 'https://kaderli.dev.ddev.site'
|
||||
condition: 'applicationContext == "Development"'
|
||||
languages:
|
||||
-
|
||||
title: English
|
||||
enabled: true
|
||||
languageId: 0
|
||||
base: /
|
||||
locale: en_US.UTF-8
|
||||
navigationTitle: English
|
||||
flag: us
|
||||
rootPageId: 1
|
||||
websiteTitle: ''
|
112
config/system/settings.php
Normal file
112
config/system/settings.php
Normal file
|
@ -0,0 +1,112 @@
|
|||
<?php
|
||||
return [
|
||||
'BE' => [
|
||||
'debug' => false,
|
||||
'installToolPassword' => '$argon2i$v=19$m=65536,t=16,p=1$NVAvWW5tMFQxNENZWkVKUw$JmdqTe6q/qA7GT6U2j/S0QiIipwzX9qOmG+GIJ1ffF4',
|
||||
'passwordHashing' => [
|
||||
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
|
||||
'options' => [],
|
||||
],
|
||||
],
|
||||
'DB' => [
|
||||
'Connections' => [
|
||||
'Default' => [
|
||||
'charset' => 'utf8',
|
||||
'dbname' => 'db',
|
||||
'driver' => 'pdo_pgsql',
|
||||
'host' => 'db',
|
||||
'password' => 'db',
|
||||
'port' => 5432,
|
||||
'user' => 'db',
|
||||
],
|
||||
],
|
||||
],
|
||||
'EXTENSIONS' => [
|
||||
'backend' => [
|
||||
'backendFavicon' => '',
|
||||
'backendLogo' => '',
|
||||
'loginBackgroundImage' => '',
|
||||
'loginFootnote' => '',
|
||||
'loginHighlightColor' => '',
|
||||
'loginLogo' => '',
|
||||
'loginLogoAlt' => '',
|
||||
],
|
||||
'extensionmanager' => [
|
||||
'automaticInstallation' => '1',
|
||||
'offlineMode' => '0',
|
||||
],
|
||||
],
|
||||
'FE' => [
|
||||
'cacheHash' => [
|
||||
'enforceValidation' => true,
|
||||
],
|
||||
'debug' => false,
|
||||
'disableNoCacheParameter' => true,
|
||||
'passwordHashing' => [
|
||||
'className' => 'TYPO3\\CMS\\Core\\Crypto\\PasswordHashing\\Argon2iPasswordHash',
|
||||
'options' => [],
|
||||
],
|
||||
],
|
||||
'GFX' => [
|
||||
'processor' => 'GraphicsMagick',
|
||||
'processor_effects' => false,
|
||||
'processor_enabled' => true,
|
||||
'processor_path' => '/usr/bin/',
|
||||
],
|
||||
'LOG' => [
|
||||
'TYPO3' => [
|
||||
'CMS' => [
|
||||
'deprecations' => [
|
||||
'writerConfiguration' => [
|
||||
'notice' => [
|
||||
'TYPO3\CMS\Core\Log\Writer\FileWriter' => [
|
||||
'disabled' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'MAIL' => [
|
||||
'transport' => 'sendmail',
|
||||
'transport_sendmail_command' => '/usr/local/bin/mailpit sendmail -t --smtp-addr 127.0.0.1:1025',
|
||||
'transport_smtp_encrypt' => '',
|
||||
'transport_smtp_password' => '',
|
||||
'transport_smtp_server' => '',
|
||||
'transport_smtp_username' => '',
|
||||
],
|
||||
'SYS' => [
|
||||
'UTF8filesystem' => true,
|
||||
'caching' => [
|
||||
'cacheConfigurations' => [
|
||||
'hash' => [
|
||||
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
|
||||
],
|
||||
'pages' => [
|
||||
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
|
||||
'options' => [
|
||||
'compression' => true,
|
||||
],
|
||||
],
|
||||
'rootline' => [
|
||||
'backend' => 'TYPO3\\CMS\\Core\\Cache\\Backend\\Typo3DatabaseBackend',
|
||||
'options' => [
|
||||
'compression' => true,
|
||||
],
|
||||
],
|
||||
],
|
||||
],
|
||||
'devIPmask' => '',
|
||||
'displayErrors' => 0,
|
||||
'encryptionKey' => '111d3227cf536b440e2d98c4d0be64bea2f6fbfad82a1f0928653ab199aa806736f65d76e62b53c49f41a3eef8b202ac',
|
||||
'exceptionalErrors' => 4096,
|
||||
'features' => [
|
||||
'frontend.cache.autoTagging' => true,
|
||||
],
|
||||
'sitename' => 'kaderli.dev',
|
||||
'systemMaintainers' => [
|
||||
1,
|
||||
],
|
||||
],
|
||||
];
|
393
public/.htaccess
Normal file
393
public/.htaccess
Normal file
|
@ -0,0 +1,393 @@
|
|||
#####
|
||||
#
|
||||
# Example .htaccess file for TYPO3 CMS - for use with Apache Webserver
|
||||
#
|
||||
# This file includes settings for the following configuration options:
|
||||
#
|
||||
# - Compression
|
||||
# - Caching
|
||||
# - MIME types
|
||||
# - Cross Origin requests
|
||||
# - Rewriting and Access
|
||||
# - Miscellaneous
|
||||
# - PHP optimisation
|
||||
#
|
||||
# If you want to use it, you have to copy it to the root folder of your TYPO3 installation (if its
|
||||
# not there already) and rename it to '.htaccess'. To make .htaccess files work, you might need to
|
||||
# adjust the 'AllowOverride' directive in your Apache configuration file.
|
||||
#
|
||||
# IMPORTANT: You may need to change this file depending on your TYPO3 installation!
|
||||
# Consider adding this file's content to your webserver's configuration directly for speed improvement
|
||||
#
|
||||
# Lots of the options are taken from https://github.com/h5bp/html5-boilerplate/blob/master/dist/.htaccess
|
||||
#
|
||||
####
|
||||
|
||||
|
||||
### Begin: Compression ###
|
||||
|
||||
# Compressing resource files will save bandwidth and so improve loading speed especially for users
|
||||
# with slower internet connections. TYPO3 can compress the .js and .css files for you.
|
||||
# *) Uncomment the following lines and
|
||||
# *) Set $GLOBALS['TYPO3_CONF_VARS']['BE']['compressionLevel'] = 9 for the Backend
|
||||
# *) Set $GLOBALS['TYPO3_CONF_VARS']['FE']['compressionLevel'] = 9 together with the TypoScript properties
|
||||
# config.compressJs and config.compressCss for GZIP compression of Frontend JS and CSS files.
|
||||
|
||||
#<FilesMatch "\.js\.gz">
|
||||
# AddType "text/javascript" .gz
|
||||
#</FilesMatch>
|
||||
#<FilesMatch "\.css\.gz">
|
||||
# AddType "text/css" .gz
|
||||
#</FilesMatch>
|
||||
#AddEncoding x-gzip .gz
|
||||
|
||||
<IfModule mod_deflate.c>
|
||||
# Force compression for mangled `Accept-Encoding` request headers
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
|
||||
RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# Compress all output labeled with one of the following media types.
|
||||
#
|
||||
# (!) For Apache versions below version 2.3.7 you don't need to
|
||||
# enable `mod_filter` and can remove the `<IfModule mod_filter.c>`
|
||||
# and `</IfModule>` lines as `AddOutputFilterByType` is still in
|
||||
# the core directives.
|
||||
#
|
||||
# https://httpd.apache.org/docs/current/mod/mod_filter.html#addoutputfilterbytype
|
||||
|
||||
<IfModule mod_filter.c>
|
||||
AddOutputFilterByType DEFLATE application/atom+xml \
|
||||
application/javascript \
|
||||
application/json \
|
||||
application/ld+json \
|
||||
application/manifest+json \
|
||||
application/rdf+xml \
|
||||
application/rss+xml \
|
||||
application/schema+json \
|
||||
application/vnd.geo+json \
|
||||
application/geo+json \
|
||||
application/vnd.ms-fontobject \
|
||||
application/x-font-ttf \
|
||||
application/x-javascript \
|
||||
application/x-web-app-manifest+json \
|
||||
application/xhtml+xml \
|
||||
application/xml \
|
||||
font/eot \
|
||||
font/opentype \
|
||||
font/otf \
|
||||
font/ttf \
|
||||
image/bmp \
|
||||
image/svg+xml \
|
||||
image/vnd.microsoft.icon \
|
||||
image/x-icon \
|
||||
text/cache-manifest \
|
||||
text/css \
|
||||
text/html \
|
||||
text/javascript \
|
||||
text/plain \
|
||||
text/vcard \
|
||||
text/vnd.rim.location.xloc \
|
||||
text/vtt \
|
||||
text/x-component \
|
||||
text/x-cross-domain-policy \
|
||||
text/xml
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_mime.c>
|
||||
AddEncoding gzip svgz
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
### End: Compression ###
|
||||
|
||||
|
||||
|
||||
### Begin: Browser caching of resource files ###
|
||||
|
||||
# This affects Frontend and Backend and increases performance.
|
||||
<IfModule mod_expires.c>
|
||||
|
||||
ExpiresActive On
|
||||
ExpiresDefault "access plus 1 month"
|
||||
|
||||
ExpiresByType text/css "access plus 1 year"
|
||||
|
||||
ExpiresByType application/json "access plus 0 seconds"
|
||||
ExpiresByType application/ld+json "access plus 0 seconds"
|
||||
ExpiresByType application/schema+json "access plus 0 seconds"
|
||||
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
|
||||
ExpiresByType application/geo+json "access plus 0 seconds"
|
||||
ExpiresByType application/xml "access plus 0 seconds"
|
||||
ExpiresByType text/xml "access plus 0 seconds"
|
||||
|
||||
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
|
||||
ExpiresByType image/x-icon "access plus 1 week"
|
||||
|
||||
ExpiresByType text/x-component "access plus 1 month"
|
||||
|
||||
ExpiresByType text/html "access plus 0 seconds"
|
||||
|
||||
ExpiresByType application/javascript "access plus 1 year"
|
||||
ExpiresByType application/x-javascript "access plus 1 year"
|
||||
ExpiresByType text/javascript "access plus 1 year"
|
||||
|
||||
ExpiresByType application/manifest+json "access plus 1 week"
|
||||
ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
|
||||
ExpiresByType text/cache-manifest "access plus 0 seconds"
|
||||
|
||||
ExpiresByType audio/ogg "access plus 1 month"
|
||||
ExpiresByType image/apng "access plus 1 month"
|
||||
ExpiresByType image/avif "access plus 1 month"
|
||||
ExpiresByType image/avif-sequence "access plus 1 month"
|
||||
ExpiresByType image/bmp "access plus 1 month"
|
||||
ExpiresByType image/gif "access plus 1 month"
|
||||
ExpiresByType image/jpeg "access plus 1 month"
|
||||
ExpiresByType image/jxl "access plus 1 month"
|
||||
ExpiresByType image/png "access plus 1 month"
|
||||
ExpiresByType image/svg+xml "access plus 1 month"
|
||||
ExpiresByType image/webp "access plus 1 month"
|
||||
ExpiresByType video/mp4 "access plus 1 month"
|
||||
ExpiresByType video/ogg "access plus 1 month"
|
||||
ExpiresByType video/webm "access plus 1 month"
|
||||
|
||||
ExpiresByType application/atom+xml "access plus 1 hour"
|
||||
ExpiresByType application/rdf+xml "access plus 1 hour"
|
||||
ExpiresByType application/rss+xml "access plus 1 hour"
|
||||
|
||||
ExpiresByType font/collection "access plus 1 month"
|
||||
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
|
||||
ExpiresByType font/eot "access plus 1 month"
|
||||
ExpiresByType font/opentype "access plus 1 month"
|
||||
ExpiresByType font/otf "access plus 1 month"
|
||||
ExpiresByType application/x-font-ttf "access plus 1 month"
|
||||
ExpiresByType font/ttf "access plus 1 month"
|
||||
ExpiresByType application/font-woff "access plus 1 month"
|
||||
ExpiresByType application/x-font-woff "access plus 1 month"
|
||||
ExpiresByType font/woff "access plus 1 month"
|
||||
ExpiresByType application/font-woff2 "access plus 1 month"
|
||||
ExpiresByType font/woff2 "access plus 1 month"
|
||||
|
||||
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
|
||||
|
||||
</IfModule>
|
||||
|
||||
### End: Browser caching of resource files ###
|
||||
|
||||
|
||||
### Begin: MIME types ###
|
||||
|
||||
# Proper MIME types for all files
|
||||
<IfModule mod_mime.c>
|
||||
# Security configuration
|
||||
RemoveType .html .htm
|
||||
<FilesMatch ".+\.html?$">
|
||||
AddType text/html .html .htm
|
||||
</FilesMatch>
|
||||
|
||||
RemoveType .svg .svgz
|
||||
<FilesMatch ".+\.svgz?$">
|
||||
AddType image/svg+xml .svg .svgz
|
||||
</FilesMatch>
|
||||
|
||||
# Data interchange
|
||||
AddType application/atom+xml atom
|
||||
AddType application/json json map topojson
|
||||
AddType application/ld+json jsonld
|
||||
AddType application/rss+xml rss
|
||||
AddType application/vnd.geo+json geojson
|
||||
AddType application/xml rdf xml
|
||||
|
||||
# JavaScript
|
||||
AddType application/javascript js
|
||||
|
||||
# Manifest files
|
||||
AddType application/manifest+json webmanifest
|
||||
AddType application/x-web-app-manifest+json webapp
|
||||
AddType text/cache-manifest appcache
|
||||
|
||||
# Media files
|
||||
|
||||
AddType audio/mp4 f4a f4b m4a
|
||||
AddType audio/ogg oga ogg opus
|
||||
AddType image/avif avif
|
||||
AddType image/avif-sequence avifs
|
||||
AddType image/bmp bmp
|
||||
AddType image/jxl jxl
|
||||
AddType image/webp webp
|
||||
AddType video/mp4 f4v f4p m4v mp4
|
||||
AddType video/ogg ogv
|
||||
AddType video/webm webm
|
||||
AddType video/x-flv flv
|
||||
AddType image/x-icon cur ico
|
||||
|
||||
# Web fonts
|
||||
AddType font/woff woff
|
||||
AddType font/woff2 woff2
|
||||
AddType application/vnd.ms-fontobject eot
|
||||
AddType font/ttf ttc ttf
|
||||
AddType font/otf otf
|
||||
|
||||
# Other
|
||||
AddType application/octet-stream safariextz
|
||||
AddType application/x-bb-appworld bbaw
|
||||
AddType application/x-chrome-extension crx
|
||||
AddType application/x-opera-extension oex
|
||||
AddType application/x-xpinstall xpi
|
||||
AddType text/vcard vcard vcf
|
||||
AddType text/vnd.rim.location.xloc xloc
|
||||
AddType text/vtt vtt
|
||||
AddType text/x-component htc
|
||||
|
||||
</IfModule>
|
||||
|
||||
# UTF-8 encoding
|
||||
AddDefaultCharset utf-8
|
||||
<IfModule mod_mime.c>
|
||||
AddCharset utf-8 .atom .css .js .json .manifest .rdf .rss .vtt .webapp .webmanifest .xml
|
||||
</IfModule>
|
||||
|
||||
### End: MIME types ###
|
||||
|
||||
|
||||
|
||||
### Begin: Cross Origin ###
|
||||
|
||||
# Send the CORS header for images when browsers request it.
|
||||
<IfModule mod_setenvif.c>
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(avifs?|bmp|cur|gif|ico|jpe?g|png|svgz?|webp)$">
|
||||
SetEnvIf Origin ":" IS_CORS
|
||||
Header set Access-Control-Allow-Origin "*" env=IS_CORS
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
</IfModule>
|
||||
|
||||
# Allow cross-origin access to web fonts.
|
||||
<IfModule mod_headers.c>
|
||||
<FilesMatch "\.(eot|otf|tt[cf]|woff2?)$">
|
||||
Header set Access-Control-Allow-Origin "*"
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
|
||||
### End: Cross Origin ###
|
||||
|
||||
|
||||
|
||||
### Begin: Rewriting and Access ###
|
||||
|
||||
<IfModule mod_rewrite.c>
|
||||
|
||||
# Enable URL rewriting
|
||||
RewriteEngine On
|
||||
|
||||
# Store the current location in an environment variable CWD to use
|
||||
# mod_rewrite in .htaccess files without knowing the RewriteBase
|
||||
RewriteCond $0#%{REQUEST_URI} ([^#]*)#(.*)\1$
|
||||
RewriteRule ^.*$ - [E=CWD:%2]
|
||||
|
||||
# Rules to set ApplicationContext based on hostname
|
||||
#RewriteCond %{HTTP_HOST} ^dev\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Development]
|
||||
#RewriteCond %{HTTP_HOST} ^staging\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Production/Staging]
|
||||
#RewriteCond %{HTTP_HOST} ^www\.example\.com$
|
||||
#RewriteRule .? - [E=TYPO3_CONTEXT:Production]
|
||||
|
||||
# Rule for versioned static files, configured through:
|
||||
# - $GLOBALS['TYPO3_CONF_VARS']['BE']['versionNumberInFilename']
|
||||
# - $GLOBALS['TYPO3_CONF_VARS']['FE']['versionNumberInFilename']
|
||||
# IMPORTANT: This rule has to be the very first RewriteCond in order to work!
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteRule ^(.+)\.(\d+)\.(php|js|css|png|jpg|gif|gz)$ %{ENV:CWD}$1.$3 [L]
|
||||
|
||||
# Access block for folders
|
||||
RewriteRule _(?:recycler|temp)_/ - [F]
|
||||
RewriteRule fileadmin/templates/.*\.(?:txt|ts)$ - [F]
|
||||
RewriteRule ^(?:vendor|typo3_src|typo3temp/var) - [F]
|
||||
RewriteRule (?:typo3conf/ext|typo3/sysext|typo3/ext)/[^/]+/(?:Configuration|Resources/Private|Tests?|Documentation|docs?)/ - [F]
|
||||
|
||||
# Block access to all hidden files and directories with the exception of
|
||||
# the visible content from within the `/.well-known/` hidden directory (RFC 5785).
|
||||
RewriteCond %{REQUEST_URI} "!(^|/)\.well-known/([^./]+./?)+$" [NC]
|
||||
RewriteCond %{SCRIPT_FILENAME} -d [OR]
|
||||
RewriteCond %{SCRIPT_FILENAME} -f
|
||||
RewriteRule (?:^|/)\. - [F]
|
||||
|
||||
# Stop rewrite processing, if we are in any known directory
|
||||
# NOTE: Add your additional local storages here
|
||||
RewriteRule ^(?:fileadmin/|typo3conf/|typo3temp/|uploads/) - [L]
|
||||
|
||||
# If the file/symlink/directory does not exist but is below /typo3/, redirect to the main TYPO3 entry point.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteRule ^typo3/(.*)$ %{ENV:CWD}index.php [QSA,L]
|
||||
|
||||
# If the file/symlink/directory does not exist => Redirect to index.php.
|
||||
# For httpd.conf, you need to prefix each '%{REQUEST_FILENAME}' with '%{DOCUMENT_ROOT}'.
|
||||
RewriteCond %{REQUEST_FILENAME} !-f
|
||||
RewriteCond %{REQUEST_FILENAME} !-d
|
||||
RewriteCond %{REQUEST_FILENAME} !-l
|
||||
RewriteRule ^.*$ %{ENV:CWD}index.php [QSA,L]
|
||||
|
||||
</IfModule>
|
||||
|
||||
# Access block for files
|
||||
# Apache < 2.3
|
||||
<IfModule !mod_authz_core.c>
|
||||
<FilesMatch "(?i:^\.|^#.*#|^(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|^composer\.(?:json|lock)|^ext_conf_template\.txt|^ext_typoscript_constants\.txt|^ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
Satisfy All
|
||||
</FilesMatch>
|
||||
</IfModule>
|
||||
# Apache ≥ 2.3
|
||||
<IfModule mod_authz_core.c>
|
||||
<If "%{REQUEST_URI} =~ m#(?i:/\.|/\x23.*\x23|/(?:ChangeLog|ToDo|Readme|License)(?:\.md|\.txt)?|/composer\.(?:json|lock)|/ext_conf_template\.txt|/ext_typoscript_constants\.txt|/ext_typoscript_setup\.txt|flexform[^.]*\.xml|locallang[^.]*\.(?:xml|xlf)|\.(?:bak|co?nf|cfg|ya?ml|ts|typoscript|tsconfig|dist|fla|in[ci]|log|sh|sql(?:\..*)?|sqlite(?:\..*)?|sw[op]|git.*|rc)|.*~)$#">
|
||||
Require all denied
|
||||
</If>
|
||||
</IfModule>
|
||||
|
||||
# Block access to vcs directories
|
||||
<IfModule mod_alias.c>
|
||||
RedirectMatch 404 /\.(?:git|svn|hg)/
|
||||
</IfModule>
|
||||
|
||||
### End: Rewriting and Access ###
|
||||
|
||||
|
||||
|
||||
### Begin: Miscellaneous ###
|
||||
|
||||
# 404 error prevention for non-existing redirected folders
|
||||
Options -MultiViews
|
||||
|
||||
# Make sure that directory listings are disabled.
|
||||
<IfModule mod_autoindex.c>
|
||||
Options -Indexes
|
||||
</IfModule>
|
||||
|
||||
<IfModule mod_headers.c>
|
||||
# Force IE to render pages in the highest available mode
|
||||
Header set X-UA-Compatible "IE=edge"
|
||||
<FilesMatch "\.(appcache|avifs?|crx|css|eot|gif|htc|ico|jpe?g|js|m4a|m4v|manifest|mp4|oex|oga|ogg|ogv|otf|pdf|png|safariextz|svgz?|ttf|vcf|webapp|webm|webp|woff2?|xml|xpi)$">
|
||||
Header unset X-UA-Compatible
|
||||
</FilesMatch>
|
||||
|
||||
# Reducing MIME type security risks
|
||||
Header set X-Content-Type-Options "nosniff"
|
||||
</IfModule>
|
||||
|
||||
# ETag removal
|
||||
<IfModule mod_headers.c>
|
||||
Header unset ETag
|
||||
</IfModule>
|
||||
FileETag None
|
||||
|
||||
### End: Miscellaneous ###
|
||||
|
||||
|
||||
# Add your own rules here.
|
Loading…
Add table
Add a link
Reference in a new issue