这里会显示出您选择的修订版和当前版本之间的差别。
note:spoony:config-composer-and-laravel [2017/04/14 05:34] Spoony |
note:spoony:config-composer-and-laravel [2017/04/14 05:55] |
||
---|---|---|---|
行 1: | 行 1: | ||
- | ====== config composer and laravel ====== | ||
- | <code> | ||
- | composer config --list --global //this will get the composer home path. | ||
- | [home] /root/.composer //it's my composer home path. | ||
- | |||
- | composer config -g secure-http false | ||
- | #修改全局文件(推荐) | ||
- | composer config -g repo.packagist composer https://packagist.phpcomposer.com | ||
- | |||
- | #修改当前配置文件 | ||
- | composer config repo.packagist composer https://packagist.phpcomposer.com | ||
- | |||
- | composer.json 文件修改后 | ||
- | |||
- | { | ||
- | "repositories": { | ||
- | "packagist": { | ||
- | "type": "composer", | ||
- | "url": "https://packagist.phpcomposer.com" | ||
- | } | ||
- | } | ||
- | } | ||
- | |||
- | 全局设置下面的几个文件设置是全局的,修改时需要root权限 | ||
- | /etc/paths | ||
- | |||
- | Apache | ||
- | <IfModule mod_rewrite.c> | ||
- | <IfModule mod_negotiation.c> | ||
- | Options -MultiViews | ||
- | </IfModule> | ||
- | Options +FollowSymLinks | ||
- | RewriteEngine On | ||
- | |||
- | # Redirect Trailing Slashes If Not A Folder... | ||
- | RewriteCond %{REQUEST_FILENAME} !-d | ||
- | RewriteRule ^(.*)/$ /$1 [L,R=301] | ||
- | |||
- | # Handle Front Controller... | ||
- | RewriteCond %{REQUEST_FILENAME} !-d | ||
- | RewriteCond %{REQUEST_FILENAME} !-f | ||
- | RewriteRule ^ index.php [L] | ||
- | |||
- | # Handle Authorization Header | ||
- | RewriteCond %{HTTP:Authorization} . | ||
- | RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}] | ||
- | </IfModule> | ||
- | |||
- | |||
- | <VirtualHost *:80> | ||
- | ServerAdmin ad@x.com | ||
- | DocumentRoot "/Library/WebServer/Documents/laravel54/public | ||
- | ServerName x.com | ||
- | ErrorLog "/private/var/log/apache2/x.com-error_log" | ||
- | CustomLog "/private/var/log/apache2/x.com-access_log" common | ||
- | |||
- | <Directory "/Library/WebServer/Documents/laravel54/public"> | ||
- | Options Indexes FollowSymLinks MultiViews | ||
- | Order allow,deny | ||
- | allow from all | ||
- | AllowOverride all | ||
- | </Directory> | ||
- | </VirtualHost> | ||
- | |||
- | </code> | ||
- | |||
- | * https://laravel.com/docs/5.4 | ||
- | * http://www.golaravel.com/laravel/docs/5.1/installation/ | ||
- | * http://laravelacademy.org/resources-download | ||
- | * https://www.exuan.org/2016/03/22/composer-downloader-transportException/ | ||
- | * https://pkg.phpcomposer.com/ | ||
- | * http://blog.csdn.net/huang2017/article/details/68945840 | ||
- | * https://segmentfault.com/a/1190000004564924 |