1. install
Zend Framework 1.11.11 full をインストールする
(参考) http://tutology.net/category/zend-framework/how-install-zend-framework-ubuntu
2. Vitrual host 関連
2.1 enable mod_rewrite
$ cd /etc/apache2/mods-enabled
$ sudo vi rewrite.load
$ cat rewrite.load
LoadModule rewrite_module /usr/lib/apache2/modules/mod_rewrite.so
$ sudo /etc/init.d/apache2 restart
2.2 add virtual host setting
$ cd /etc/apache2/sites-available
$ sudo cp default zf
$ sudo vi zf
$ cat zf
(snip)
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/zf
ServerName zf.com
<Directory /var/www/zf/>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
DirectoryIndex index.php
Order allow,deny
allow from all
</Directory>
RewriteEngine Off
<Location />
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css)$ /index.php
</Location>
</VirtualHost>
$ sudo a2ensite zf
$ sudo /etc/init.d/apache2 restart
$ cd /var/www
$ sudo mkdir zf
$ cd zf
$ sudo vi index.php
$ cat index.php
<?php
echo 'hello';
?>
$ sudo vi /etc/hosts
$ cat /etc/hosts | grep zf
127.0.0.1 zf.com
これで準備完了で、いよいよZend Framework。(参考) http://framework.zend.com/manual/en/learning.quickstart.html
0 件のコメント:
コメントを投稿