Setup NGINX site from command line
1) Sign into Linux server using an application like Putty (Windows) or Terminal (Mac):
2) Create the website directory (for example, domesticmamaeo.com):
mkdir -p /var/www/domesticmamaeo.com/public_html
mkdir -p /var/www/domesticmamaeo.com/logs
3) Change the ownership of the directory to the web user:
chown -R www-data:www-data /var/www/theatereleven.com/public_html
chown -R www-data:www-data /var/www/domesticmamaeo.com/logs
4) Create the web site config file (we’re copying another and then editing – aussieup is current)
cp /etc/nginx/sites-available/aussieup.com /etc/nginx/sites-available/domesticmamaeo.com
5) Edit the new config file to replace with this site’s values:
Edit the line that reads: root /var/www/aussieup.com/public_html to be the current domain name.
Edit the two server_name instances to be the new domain name.
Edit access_log and error_log paths for new domain name
Save the file by hitting Ctrl-X, then Y and then Enter.
6) Enable the new site in Nginx:
ln -s /etc/nginx/sites-available/outergain.com /etc/nginx/sites-enabled/
7) Restart Nginx:
service nginx restart
*If it doesn’t do anything, that’s good. If nginx fails to restart, 99.999% of the time it means the folder name you created in step 2 doesn’t match point B or D of step 5. Simply fix and restart nginx again. This is a big deal, because if nginx fails to restart, all of the sites are down. Worst case, you don’t know what went wrong, disable the new site, and restart nginx again.
9) Create the database and user.
mysql -u root -p
create database domesticm;
(note: i always create the db and user the same as the domain name. makes it easy. however, mysql users are limited to 16 characters. so if the domain name is longer, i truncate both in some fashion. just make them match)
grant all on domesticm.* to ‘domesticm’ identified by ‘Dmx#f!l2rtNv74’;
(the last part is the password. just make up a hard one – we don’t need to record this anywhere, but you’ll need it with the restore)
8) Copy importbuddy.php to the public_html folder in your sFTP client.
9) Go to the full URL
10) Restore from Stash
If the backup file isn’t there, just do the norm and create a backup and send it to the stash.
*Note: when doing from stash, Backup Buddy might open an additional tab and dump you to it, which looks like nothing is happening. Just go back to your first tab.
11) Everything else is the same.