Skip to content

Instantly share code, notes, and snippets.

@brainwire
Created April 10, 2014 06:42
Show Gist options
  • Save brainwire/10348659 to your computer and use it in GitHub Desktop.
Save brainwire/10348659 to your computer and use it in GitHub Desktop.
New Appache host
/etc/apache2/sites-available
<VirtualHost *:80>
ServerAdmin my@yandex.ru
ServerName site.dev
ServerAlias www.site.dev
DocumentRoot /var/www/site.dev/public_html/
ErrorLog /var/www/site.dev/logs/error.log
CustomLog /var/www/site.dev/logs/access.log combined
</VirtualHost>
mkdir -p /var/www/site.dev/public_html
mkdir -p /var/www/site.dev/logs
a2ensite site.dev
/etc/init.d/apache2 reload
mysql -u root -p
create database spina;
GRANT ALL PRIVILEGES ON site.* TO 'site'@'localhost' IDENTIFIED BY '123' WITH GRANT OPTION;
FLUSH PRIVILEGES;
mysql -u site -p123 site < /var/www/site.dev/public_html/site_gen.sql
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment