Setup Apache and MySQL
To run the website, we'll install a database, webserver and scripting language. You'll need to install the following ports and their dependencies:
- databases/mysql51-server - MySQL server
- www/apache22 - Webserver
- lang/php5 - PHP
You'll need to add the following lines to your /etc/rc.conf file to enable Apache and MySQL to run as daemons:
apache22_enable="YES"
mysql_enable="YES"MySQL
By default MySQL's root user has no password. This is a huge security hole so you'll want to set one using the following command:
$ mysqladmin -u root password WhatEverYourNewPasswordShouldBeApache
You'll need to make some changes to Apache's configuration to get Drupal up and running. So use your favorite text editor to open up the /usr/local/etc/apache22/httpd.conf file.
The first thing is to make sure that the ServerAdmin and ServerName directive have the correct values.
Find the DocumentRoot directive and change it to read:
DocumentRoot "/usr/local/www/drupal"Find the <Directory "/usr/local/www/apache22/data"> directive and change it to:
<Directory "/usr/local/www/drupal">Change AllowOverride None directive and change it to:
AllowOverride Options FileInfo Limit IndexesFinally, add the following block to the bottom of the file to enable PHP5:
<IfModule php5_module>
AddType application/x-httpd-php .php
AddType application/x-httpd-php-source .phps
<IfModule dir_module>
DirectoryIndex index.php index.html
</IfModule>
</IfModule>






