Last active
February 15, 2017 15:04
-
-
Save waylay/8fd0c7280cfe1546638598add083d0c4 to your computer and use it in GitHub Desktop.
Add new domain or subdomain on DO
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1. Networking / Add Domain or Create new A record for subdomain; | |
2. cp /etc/apache2/sites-available/000-default.conf /etc/apache2/sites-available/example.com.conf | |
3. vi /etc/apache2/sites-available/example.com.conf | |
----------- | |
<VirtualHost *:80> | |
ServerAdmin admin@example.com | |
DocumentRoot /var/www/example.com | |
ServerName example.com | |
ServerAlias www.example.com | |
<Directory /var/www/example.com/> | |
Options Indexes FollowSymLinks | |
AllowOverride All | |
Require all granted | |
</Directory> | |
ErrorLog ${APACHE_LOG_DIR}/error.log | |
CustomLog ${APACHE_LOG_DIR}/access.log combined | |
</VirtualHost> | |
Include /etc/phpmyadmin/apache.conf | |
------------ | |
4. mkdir /var/www/example.com | |
5. chown -R www-data:www-data /var/www/example.com | |
6. a2ensite example.com.conf | |
7. service apache2 reload |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment