Skip to content

Instantly share code, notes, and snippets.

@cdcarson
Created April 19, 2012 21:54
Show Gist options
  • Save cdcarson/2424464 to your computer and use it in GitHub Desktop.
Save cdcarson/2424464 to your computer and use it in GitHub Desktop.
Creating a Yii application
- checkably
- app
- assets
- css
- images
- protected
- themes
- index-test.php
- index.php
- yii
- build
- demos
- docs
- framework
- requirements
- tests
$ sudo nano /private/etc/hosts
$ sudo nano /private/etc/apache2/extra/httpd-vhosts.conf
##
# Host Database
#
# localhost is used to configure the loopback interface
# when the system is booting. Do not change this entry.
##
127.0.0.1 localhost
255.255.255.255 broadcasthost
127.0.0.1 mysql.loc
127.0.0.1 checkably.loc
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
#create a directory called "checkably"...
$ mkdir ~/path/to/checkably
# navigate to the directory...
$ cd ~/path/to/checkably/
# clone Yii...
$ git clone https://github.com/yiisoft/yii.git
# create the application in the "checkably/app" directory ...
$ php yii/framework/yiic.php webapp app
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/path/to/checkably/app"
ServerName checkably.loc
DirectoryIndex index.php
<Directory "/path/to/checkably/app">
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
Allow from all
</Directory>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment