@ -31,67 +31,6 @@ the [Creative Commons Attribution-ShareAlike 4.0 International](https://creative  
			
		
	
		
			
				
					unless otherwise stated.  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					## MYSQL Schema  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					```mysql  
			
		
	
		
			
				
					create database jrtechs_blog;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					use jrtechs_blog;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table users(  
			
		
	
		
			
				
					user_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					user_name varchar(60) not null,  
			
		
	
		
			
				
					password char(64) not null,  
			
		
	
		
			
				
					salt char(64) not null,  
			
		
	
		
			
				
					primary key(user_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table categories(  
			
		
	
		
			
				
					category_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					name varchar(60) not null,  
			
		
	
		
			
				
					url varchar(60) not null,  
			
		
	
		
			
				
					primary key(category_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table posts(  
			
		
	
		
			
				
					post_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					category_id mediumint unsigned not null,  
			
		
	
		
			
				
					picture_url varchar(100) not null,  
			
		
	
		
			
				
					published datetime not null,  
			
		
	
		
			
				
					name varchar(100) not null,  
			
		
	
		
			
				
					url varchar(100) not null,  
			
		
	
		
			
				
					primary key(post_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table downloads(  
			
		
	
		
			
				
					download_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					file varchar(40) not null,  
			
		
	
		
			
				
					name varchar(40) not null,  
			
		
	
		
			
				
					download_count mediumint not null,  
			
		
	
		
			
				
					primary key(download_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table popular_posts(  
			
		
	
		
			
				
					popular_post_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					post_id mediumint unsigned not null,  
			
		
	
		
			
				
					primary key(popular_post_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					create table traffic_log(  
			
		
	
		
			
				
					log_id mediumint unsigned not null AUTO_INCREMENT,  
			
		
	
		
			
				
					url varchar(60) not null,  
			
		
	
		
			
				
					ip varchar(20) not null,  
			
		
	
		
			
				
					date datetime not null,  
			
		
	
		
			
				
					primary key(log_id)  
			
		
	
		
			
				
					);  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					grant all on jrtechs_blog.* to blog_user@localhost identified by "password";  
			
		
	
		
			
				
					```  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					## Node Dependencies  
			
		
	
		
			
				
					```bash  
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -110,7 +49,7 @@ npm install memory-cache --save  
			
		
	
		
			
				
					npm install request  
			
		
	
		
			
				
					npm install nodemailer  
			
		
	
		
			
				
					npm install nodemailer-smtp-transport  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					npm install whiskers  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					npm install node-pandoc  
			
		
	
		
			
				
					```  
			
		
	
	
		
			
				
					
						
							
								 
						
						
							
								 
						
						
					 
				
				@ -140,7 +79,8 @@ apt-get install optipng  
			
		
	
		
			
				
					## NGINX Configuration  
			
		
	
		
			
				
					```  
			
		
	
		
			
				
					#jrtechs .net.conf 
			
		
	
		
			
				
					server {  
			
		
	
		
			
				
					server   
			
		
	
		
			
				
					{  
			
		
	
		
			
				
					    listen 80;  
			
		
	
		
			
				
					    server_name www.jrtechs.net jrtechs.net;  
			
		
	
		
			
				
					
  
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -148,7 +88,8 @@ server {  
			
		
	
		
			
				
					    return 301 https://jrtechs.net$request_uri;  
			
		
	
		
			
				
					}  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					server {  
			
		
	
		
			
				
					server   
			
		
	
		
			
				
					{  
			
		
	
		
			
				
					    listen 443 ssl http2;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					    server_name jrtechs.net;  
			
		
	
	
		
			
				
					
						
						
						
							
								 
						
					 
				
				@ -167,38 +108,11 @@ server {  
			
		
	
		
			
				
					}  
			
		
	
		
			
				
					```  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					```  
			
		
	
		
			
				
					#admin .jrtechs.net.conf 
			
		
	
		
			
				
					server {  
			
		
	
		
			
				
					    listen 80;  
			
		
	
		
			
				
					    server_name www.admin.jrtechs.net admin.jrtechs.net;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					    # redirect http requests to https  
			
		
	
		
			
				
					    return 301 https://admin.jrtechs.net$request_uri;  
			
		
	
		
			
				
					}  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					server {  
			
		
	
		
			
				
					    listen 443 ssl http2;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					    server_name admin.jrtechs.net;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					    ssl_certificate /etc/letsencrypt/live/admin.jrtechs.net/cert.pem;  
			
		
	
		
			
				
					    ssl_certificate_key /etc/letsencrypt/live/admin.jrtechs.net/privkey.pem;  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					    location / {  
			
		
	
		
			
				
					        proxy_pass http://localhost:8001;  
			
		
	
		
			
				
					        proxy_http_version 1.1;  
			
		
	
		
			
				
					        proxy_set_header Upgrade $http_upgrade;  
			
		
	
		
			
				
					        proxy_set_header Connection 'upgrade';  
			
		
	
		
			
				
					        proxy_set_header Host $host;  
			
		
	
		
			
				
					        proxy_cache_bypass $http_upgrade;  
			
		
	
		
			
				
					    }  
			
		
	
		
			
				
					}  
			
		
	
		
			
				
					```  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					## Projects Sites  
			
		
	
		
			
				
					As I develop more projects I would like an easy way to add and host them on my website without having to create another subdomain and generate more ssl certs. I simply want the project site to be accessible under https://jrtechs.net/project_name.  
			
		
	
		
			
				
					As I develop more projects I would like an easy way to add and host them on my website without having to create another sub-domain and generate more ssl certs.   
			
		
	
		
			
				
					I simply want the project site to be accessible under https://jrtechs.net/project_name.  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					### State Diagrm of Plan  
			
		
	
		
			
				
					### State Diagram of Plan  
			
		
	
		
			
				
					
  
			
		
	
		
			
				
					