Difference between revisions of "Installation"
From Contao Community Documentation
(→Configuring .htaccess) |
m (Added screenshot of the Contao backend settings for front-end configuration.) |
||
Line 26: | Line 26: | ||
*Remove the ''.htaccess'' file and rename the ''.htaccess.default'' file to ''.htaccess'' | *Remove the ''.htaccess'' file and rename the ''.htaccess.default'' file to ''.htaccess'' | ||
*In the Contao backend go to System>Settings and under the ''Front end configuration'' enable '''Rewrite URLs''' and specify your '''URL suffix''' | *In the Contao backend go to System>Settings and under the ''Front end configuration'' enable '''Rewrite URLs''' and specify your '''URL suffix''' | ||
− | [[Front-end-configuration.png]] | + | [[File:Front-end-configuration.png]] |
*Uncomment the following lines in your .htaccess file: | *Uncomment the following lines in your .htaccess file: | ||
**RewriteEngine On ''This enables the rewriting of URLs'' | **RewriteEngine On ''This enables the rewriting of URLs'' |
Revision as of 13:24, 17 January 2012
Requirements
- Webserver (Apache, IIS, etc.)
- PHP version 5.2 or greater
- MySQL version 4.1 or greater
- PHP extension GDLib
- PHP extension mcrypt (optional)
Installation
- Download a Contao package
- Extract the downloaded archive onto your server
- Download the system check tool and extract the contao-check.php file onto your server
- Once extracted, point your browser to http://yourserver.com/contao-check.php
- Fix any warnings or errors that it detects
- Point your browser to http://yourserver.com/contao/install.php
- Follow the instructions of the install tool
Cleaning Up
- Login to the backend of Contao (http://yourserver.com/contao/) to test that the installation works.
- Remove http://yourserver.com/contao/install.php for extra security.
Configuring .htaccess
- Make a backup of your .htaccess file if you have one
- Remove the .htaccess file and rename the .htaccess.default file to .htaccess
- In the Contao backend go to System>Settings and under the Front end configuration enable Rewrite URLs and specify your URL suffix
- Uncomment the following lines in your .htaccess file:
- RewriteEngine On This enables the rewriting of URLs
- RewriteBase / This sets the base directory for the rewrite. Change this if contao is in a sub-directory. (e.g. apacheroot/contaoishere/)
- RewriteRule .*\.htm$ index.php [L] This sets the rewrite rule. It should match the suffix that you specified in the Contao backend! This example is for the .htm suffix.
Troubleshooting
If the Contao install tool asks you for FTP details in order to enable the Safe Mode Hack ensure that www-data owns the directory that Contao is in!
On Linux you can do the following: chown -R www-data:www-data apacheroot/
Note: You may need to run the command above as superuser.