apache+php初试

参阅以下内容:

http://wiki.debian.org/LaMp

http://kimbriggs.com/computers/computer-notes/linux-notes/apache2-public_html-virtual-directories.file


such as, Enable module userdir(disable use command a2dismod):

a2enmod userdir

vi /etc/apache2/mods-enabled/userdir.conf


cp /etc/apache2/sites-available/default /etc/apache2/sites-available/mysite

vi /etc/apache2/sites-available/mysite


Change DocumentRoot /var/www to  DocumentRoot /opt/mysite

Change the Directory directive, replace <Directory /var/www/> to <Directory /opt/mysite/>

sudo a2dissite default && sudo a2ensite mysite

sudo service apache2 restart


Additional, install php with some preparatino for Kohana:

sudo apt-get install php5 php5-mysql php5-curl php5-gd php5-mcrypt libapache2-mod-php5 php-pear

eh, pecl_http for php was not found on debian 7.

你可能感兴趣的:(apache)