-
Notifications
You must be signed in to change notification settings - Fork 0
2. Apache Webserver Installation and Configuration
Dominik edited this page Jul 13, 2014
·
1 revision
Our application is based on an Apache Webserver, which is used for hosting the website. To provide a working and configured infrastructure you need to fulfill the following steps.
- Download and install Apache including the used extensions like php and database support via apt-get:
sudo apt-get install apache2 apache2-doc apache2-utils libapache2-mod-php5 php5 php5-common php5-pgsql libapache2-mod-fcgid
- Open the php.ini file:
sudo nano /etc/php5/apache2 php.ini
- Until now, the Webser can not handle database support. To solve this problem, you need to modify the
php.ini
file, which can be found in the root-folder of your php5 installtion. Insert the following lines at the button of file:extension=php_pgsql.dll
,extension=php_pdo_pgsql.dll
. Additionally put the lineextension=php_pdo.dll
andextension=php_sqlite.dll
to support the usage of mbtiles. - Restart Apache to load the pgsql and sqlite modules by typing:
sudo service apache2 restart
.
To check the php configuration, create a new file info.php
with the following content and put it in the var/www folder of Apache instance. Access it via your webbrowser.
<?php
phpinfo();
?>
Please note that Apache communicates through the in the setup defined port (which is by default port 80), which have to be opened by creating a Firewall exception to work properly. To define a new Firewall Rule, follow the steps below:
- Enable the ufw-firewall:
ufw allow
- Type
ufw allow 80/tcp
to open the port 80. - To save the changes type
ufw reload