-
-
Notifications
You must be signed in to change notification settings - Fork 812
How to set up a new dev site (subdomain)
benomatis edited this page Sep 9, 2017
·
3 revisions
Note: this process can only be used by someone with access to the server
- ssh into server1
- cd /var/www/Sites
- (assuming there is an up-to-date version of the VE repo in my home folder, and that my user is part of the sudoers) sudo git clone ~/Yii/.git xxxx.vocaleyes.org
- su - root
- cd /var/www/Sites/xxxx.vocaleyes.org
- Copy db, debug and params from database to protected/config: cp database/db.php protected/config (…etc)
- nano protected/config/db.php
- Change host localhost to localab2 > Save (Ctrl + X, Y, Enter)
- chmod 777 protected/runtime
- mkdir assets
- chmod 777 assets
- cd ..
- chown -R developer:developer xxxx.vocaleyes.org
- su - developer
- cp dev.vocaleyes.org/.git/config xxxx.vocaleyes.org/.git/config
- cd xxxx.vocaleyes.org
- git checkout -b xxxx
- git pull origin xxxx:xxxx
- cd /etc/apache2/sites-available
- cp dev.vocaleyes.org.conf xxxx.vocaleyes.org.conf
- nano xxxx.vocaleyes.org.conf
- Replace every occurrence of dev with xxxx
- Ctrl + w
- Ctrl + r
- Type dev > Enter
- Type xxxx > Enter
- a
- Ctrl + x
- Y > Enter
- cd ../sites-enabled
- ln -s /etc/apache2/sites-available/xxxx.vocaleyes.org.conf /etc/apache2/sites-enabled/xxxx.vocaleyes.org.conf
- service apache2 restart
- nano /export/users/developer/update-script.sh
- Add the following lines at the logical place
cd /var/www/Sites/xxxx.vocaleyes.org/
git fetch -a &&
git checkout xxxx &&
git pull origin xxxx && \
Kunena