sudo mkdir -p /var/www/test.loc/public_html
+ sudo chown -R $USER:$USER /var/www/test.loc/public_html <---!!!!!
sudo chmod -R 775 /var/www
sudo nano /var/www/test.loc/public_html/index.html
<html></html>
+ sudo cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/test.loc.conf
+ sudo nano /etc/apache2/sites-available/test.loc.conf
<VirtualHost *:80>
ServerAdmin admin@test.com
ServerName test.loc
ServerAlias www.test.loc
DocumentRoot /var/www/test.loc/public_html
<Directory /var/www/test.loc/public_html>
#DirectoryIndex index.php (Options Indexes)
#AllowOverride All (AllowOverride All)
Require all granted
#Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log | /home/pro/domains/gh/temp.loc/logs/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
+ sudo a2ensite test.loc (sudo a2dissite site_name)
+ sudo a2enmod rewrite
+ sudo service apache2 restart (reload)
or sudo /etc/init.d/apache2 restart
+ sudo nano /etc/hosts
==========================================
Setup yii2 advanced
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application
php init
/yii-application/vendor/bower/jquery/dist
sudo composer self-update
composer global require "fxp/composer-asset-plugin:^1.2.0"
rm -rf vendor
composer install
===============================================
---------------------------------------------------------------
Setup yii2 basic
composer config -g github-oauth.github.com <oauthtoken> -> one time
composer global require "fxp/composer-asset-plugin:^1.2.0"
composer create-project --prefer-dist yiisoft/yii2-app-basic basic
cd basic/web
php -S localhost:8080 -> http://localhost:8080
-----------------------------------------------------------
========================================
Setup GitHub
echo "# rep_name" >> README.md
git init
nano .gitignore (vendor)
git add README.md
git commit -m "first commit"
git remote add origin https://github.com/username/repository.git
git push -u origin master
git checkout -b name-branch
git branch
Changing a remote's URL
git remote -v
origin git@github.com:USERNAME/REPOSITORY.git (fetch)
origin git@github.com:USERNAME/REPOSITORY.git (push)
-
Change your remote's URL from SSH to HTTPS with the
git remote set-url command.
git remote set-url origin https://github.com/USERNAME/OTHERREPOSITORY.git
=============================================
sudo nano /var/apache2/error.log ? /
Cannot create cache directory /home/pro/.composer/cache/repo/https---packages.zendfremework.com/, or directory is not writable. Proceeding without cache
---> sudo chown -R $USER $HOME/.composer
Комментариев нет:
Отправить комментарий