4 Comments // Reading Time: 7 min.
A user and developer community from all over the world takes care of this multilingual system. TYPO3 is one of the best-known content management systems in the field of free software. This system is used particularly frequently in German-speaking countries.
For the configuration of the TYPO3 system on a web server, the server must have an up-to-date PHP environment and database. Apache is a cross-platform server that can be used on different operating systems such as Windows or Ubuntu. Apache is also one of the most popular web servers and is actively updated and maintained as open source.
But now to why you actually read here.
First you have to download the TYPO3 Source. I have chosen TYPO3 CMS 6.2 LTS.
In the directory /var/www/ I have the subfolder "html". In this folder I created the folder Example123 and unpacked the source into it. Use these commands:
cd /var/www/html/Example123/ tar -xzf ~/Downloads/typo3_src-6.2.4.tar.gz
Now you have to create the symlinks.
mv typo3_src-6.2.4 .. ln -s ../typo3_src-6.2.4 typo3_src ln -s typo3_src/typo3/ typo3 ln -s typo3_src/index.php index.php
Once you've done that, create a new virtual host. Instead of Example123, use a name of your choice.
sudo vim /etc/apache2/sites-available/Example123.conf
In this file you enter the following now. It is important that the further information is written there.
<VirtualHost *:80> </VirtualHost>
Virtual Host: Virtual hosting means running more than one web page on a single server. Virtual hosts can be "IP-based", meaning that each web site has a different IP, or "name-based", meaning that multiple names run under each IP address.
ServerAdmin firstname.lastname@example.org ServerName Example123 DocumentRoot /var/www/html/Example123
Of course you have to define the first two points for yourself. At "DocumentRoot" you have to choose the directory where you unpacked the sources of TYPO3 (in my case this would be /var/www/html/Example123/).
To group directives (instructions/commands) so that they only apply to that directory, you need to enter the following. The path has to be changed here again.
<Directory /var/www/html/Example123/> Options Indexes FollowSymLinks MultiViews AllowOverride All Order allow,deny allow from all </Directory>
Options: Durch diese Direktive wird gesteuert, inwiefern Eigenschaften und Funktionen in den Verzeichnissen verfügbar sind.
Indexes: Falls eine URL, ein Verzeichnis aufruft, das keine durch DirectoryIndex definierte Indexdatei (z.B. index.html ) beinhaltet, so wird mod_autoindex eine formatierte Auflistung des Verzeichnisses zurück senden.
FollowSymLinks: Der Server folgt symbolischen Links in diesem Verzeichnis.
MulitViews: Sobald in einem Verzeichnis z.B. auf eine “index.html”, zugegriffen werden soll, in diesem Verzeichnis allerdings keine entsprechende Datei vorliegt, sucht der Apache selbstständig nach einer Datei im selben Format („index.”) und gibt diese zurück.
AllowOverride: Die Datei .htacces darf Anweisungen überschrieben. Diese Direktive legt fest welche sie überschrieben darf und welche nicht. In TYPO3 ist dies beispielsweise für RealUrl zwingend erforderlich.
Order und allow from: Diese Direktiven erlauben wer auf den Server zugreifen darf.
Options: This directive controls the extent to which properties and functions are available in the directories.
Indexes: If a URL calls a directory that does not contain an index file defined by DirectoryIndex (e.g. index.html ), mod_autoindex will return a formatted listing of the directory.
FollowSymLinks: The server follows symbolic links in this directory.
MulitViews: As soon as an "index.html", for example, is to be accessed in a directory, but there is no corresponding file in this directory, Apache automatically searches for a file in the same format ("index.") and returns it.
AllowOverride: The .htacces file may overwrite statements. This directive specifies which ones may and may not be overwritten. In TYPO3, for example, this is mandatory for RealUrl.
Order and allow from: These directives allow who can access the server.
Now the "ErrorLog" and the "CustomLog" have to be inserted.
ErrorLog: The collection point for errors of Apache and its modules.
CustomLog: Saves the requests: Stores the requests sent to the server.
ErrorLog /var/log/apache2/Example123error.log CustomLog /var/log/apache2/Example123access.log combined
This is what my Example123.conf. looks like now:
After that, you'll have to use those commands:
sudo a2ensite Example123.conf sudo service apache2 restart
If you complete the following entry, you can also test your VirtualHost without DNS entry.
sudo vim /etc/hosts
As you can see in Figure 2, you need to add the following line with your own server name.
If you call your page (in my case Example123.de), you should get figure 3:
The file "FIRST_INSTALL" can be created with the command "touch".
If you get the following pictures after reloading the page, I'll explain how to fix the bugs.
The upper half is not important at the moment. We'll take care of the bugs now.
You have to change to the folder with your TYPO3 installation and update the permissions there so that the web server has access to it.
chown -R www-data:www-data .
Then you have to add yourself to the group www-data.
sudo usermod -aG www-data Username
If you don't want to restart your system, I recommend the following command:
newgrp - www-data
cd /var/www/html/ ls -la
There should be this:
drwxrwxr-x 7 www-data www-data 4096 Jul 29 15:14 Example123
Of course again with your path. If you reload the page the bug is fixed.
To fix this error, you have to open this file:
sudo vim /etc/php5/apache2/php.ini
Searches the file for these keywords:
upload_max_filesize post_max_size memory_limit
The first two must be set to 10M and "memory_limit" at least to 32M, otherwise an error will occur again.
Not directly an error but a warning. The warning can be fixed by opening the php.ini above again and searching for the following information:
Now change the specification from 30 to 240 (as specified in the warning) and execute the following command:
sudo service apache2 restart
And already the bugs are fixed and we can go on.
At point 3 you create a new database, or select an existing database.
Once you have created or selected the database, you will need to create a backend administrator.
After this point you are almost done.
Now open the backend of your page by clicking on the button below.
Now log in with your previously selected data.
We are a digital agency headquartered in Munich/Unterföhring, which works remotely worldwide. We are specialized in the development of digital products. Our core topics are websites and portals with TYPO3, eCommerce with Shopware and Android and iOS-Apps. In addition, we deal with many other topics in the field of web development. Feel free to contact us with your concerns!