cd /etc/apache2/sites-available/
sudo cp default site.local
sudo gedit site.local
<VirtualHost *:80>
DocumentRoot "/home/amey/htdocs/site.local/public"
ServerName site.local
SetEnv APPLICATION_ENV development
<Directory "/home/amey/htdocs/site.local/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
добавляем в /etc/hosts:
127.0.0.1 site.local
Включаем хост и рестартим апач:
sudo a2ensite site.local
sudo /etc/init.d/apache2 restart
sudo cp default site.local
sudo gedit site.local
<VirtualHost *:80>
DocumentRoot "/home/amey/htdocs/site.local/public"
ServerName site.local
SetEnv APPLICATION_ENV development
<Directory "/home/amey/htdocs/site.local/public">
Options Indexes MultiViews FollowSymLinks
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
добавляем в /etc/hosts:
127.0.0.1 site.local
Включаем хост и рестартим апач:
sudo a2ensite site.local
sudo /etc/init.d/apache2 restart
Часто бывает что по умолчанию в Apache отсутствует mod_rewrite для активации нужно выполнить:
ОтветитьУдалитьsudo a2enmod rewrite