Apache + Linux Mint

Install

Ubuntu Apachehttp://wiki.ubuntuusers.de/Apache

sudo apt-get install apache2

Ubuntu PHPhttp://wiki.ubuntuusers.de/PHP

sudo apt-get install php5

Ubuntu phpMyAdminhttp://www.zentralplan.de/?37

sudo apt-get install mysql-server phpmyadmin php5-gd
Change user and group recursive:
# Add user to a group
usermod -a -G groupName userName
# Change owner
chown -R www-data:www-data /media/root/
# Change rights
chmod 750 /home/paul/oc -R

 

Configuration 

Web path

Default path: /var/www

Apache Vhosts (see ubuntuusers.de):

add symlink to /etc/apache2/sites-enabled of each configuration from /etc/apache2/sites-available that you want to activate.

ln -s /source/file/folder linkname

Enable mod_rewrite in php:

sudo a2enmod rewrite
Allow access to phpMyAdmin only in local network:

For this you need to edit the following file in the following way.

sudo node /etc/phpmyadmin/apache2.conf
<Directory /usr/share/phpmyadmin>
    # Add the following 3 lines
    Order Deny,Allow
    Deny from All
    Allow from ::1 127.0.0.0/8 192.168.0.0/16
    # Don't change anything from this point
    ...
</Directory>

Do the same for all other virtual hosts that you want to access only from local network.

Restart Apache2:

sudo /etc/init.d/apache2 reload
# OR
service apache2 restart

 

Debuging and Error cases

Log

tail -f  /var/log/apache2/error.log

Mod rewrite doesn’t work

Use the following option in your virtual host configuration.

<Directory /../../ >
  Options FollowSymLinks
  AllowOverride All
</Directory>