Installing Apache
apt-get install apache2
After that , do test HTTP Server:
Open a web browser and enter http://localhost or its IP Address http://ip-address.
Installing PHP
apt-get install php4 /etc/init.d/apache2 restart vi /var/www/testphp.php
To test it, Insert this following line into testphp.php file.
<?php phpinfo(); ?>
Open a web browser and enter http://IP-Address/testphp.php .
Install PostgreSQL
apt-get install libapache2-mod-auth-pgsql apt-get install php4-pgsql /etc/init.d/apache2 restart
Mapping URLs to folders outside /var/www/
vi /etc/apache2/conf.d/alias
Insert this following line into the new file.
Alias /URL-path /location_of_folder/ <directory /location_of_folder/> Options Indexes FollowSymLinks AllowOverride All Order allow,deny Allow from all </Directory>
Save a new file.
Restart Apache
/etc/init.d/apache2 restart
finished :)
No comments:
Post a Comment