You don't have permission to access /index.php on this server
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host.example.com"
ServerName dummy-host.example.com
ServerAlias www.dummy-host.example.com
ErrorLog "logs/dummy-host.example.com-error_log"
CustomLog "logs/dummy-host.example.com-access_log" common
</VirtualHost>
<VirtualHost *:80>
ServerAdmin [email protected]
DocumentRoot "/Applications/XAMPP/xamppfiles/docs/dummy-host2.example.com"
ServerName dummy-host2.example.com
ErrorLog "logs/dummy-host2.example.com-error_log"
CustomLog "logs/dummy-host2.example.com-access_log" common
</VirtualHost>
|
<VirtualHost jiuyuan:80>
#ServerAdmin [email protected]
DocumentRoot "/myspace/workspace/webdesign/html/jiuyuan"
ServerName jiuyuan
ServerAlias www.jiuyuan.com
DirectoryIndex index.html
<Directory "/myspace/workspace/webdesign/html/jiuyuan">
#Options -Indexes FollowSymLinks
#AllowOverride None
#Order allow,deny
#Allow from all
Require all granted
</Directory>
ErrorLog "logs/error_log"
CustomLog "logs/access_log" common
</VirtualHost>
<VirtualHost phpfirst:80>
#ServerAdmin [email protected]
DocumentRoot "/myspace/workspace/webroot/phpfirst"
ServerName phpfirst
ServerAlias www.phpfirst.com
DirectoryIndex index.html index.php
<Directory "/myspace/workspace/webroot/phpfirst">
#Options -Indexes FollowSymLinks
#AllowOverride None
#Order allow,deny
#Allow from all
Require all granted
</Directory>
ErrorLog "logs/error_log"
CustomLog "logs/access_log" common
</VirtualHost>
|
1)在httpd.conf文件中已经配置了local访问的路径,默认是/Applications/XAMPP/xamppfiles/htdocs目录 |
1
|
curl -s http:
//getcomposer.org/installer | php
|
然后你可以使用如下命令创建一个基础应用程序:
1
|
php composer.phar create-project --prefer-dist --stability=dev yiisoft/yii2-app-basic /path/to/yii-application
|
http://localhost/
来访问这个应用。
问题
1、下载的过程中可能会遇到下载bootstrap没有权限的问题,需要你输入对应的网址获取token,然后在命令行中粘贴token,注意是不可见的
88785ac9dfda7f2e102ae962c8e6f256e98bdcc4
2、配置hosts和虚拟主机后,重启apache和hosts进程,正常的话就会出现yii界面,是用bootstrap构建的界面,还有可能会缺少jquery或者bootstrap文件,1)可以将bower下面bower-assert的文件移动到bower下面
2)可以在目录下面
/path/to/yii-application/vendor/yiisoft/yii2/base
第456行将目录bower改为bower/bower-assert
|