Skip to content

andrewdetorres/SiteGen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SiteGen

A bash script that can be used to auto deploy a simple site to deploy a basic site.

Using SiteGen

Below is a list of instruction that can be used to deploy your new site on your linux machine.

Prerequisites

Please insure that you are running nginx 1.14.0 or above

sudo apt update
sudo apt install nginx

System File Structure

This script runs based on the following server setup.

├┬ /var/www/html
│└ [SITE_NAME]
│
├┬ /etc/nginx/sites-available
│└ [SITE_NAME]
│
├┬ /etc/nginx/sites-enabled
│└ [SITE_NAME]

Nginx Configuration

Please ensure that the Nginx configuration sutis your requirements.

server {
	server_name SITENAME  www.SITENAME;
	root /var/www/html/SITENAME/public_html;

	index index.php index.html index.htm index.nginx-debian.html;

	location / {
		try_files $uri $uri/ /index.php?$args;
	}

	location ~ \.php$ {
		include snippets/fastcgi-php.conf;
		fastcgi_pass unix:/var/run/php/php7.0-fpm.sock;
	}

	location ~ /\.ht {
		deny all;
	}

  error_log /var/www/html/SITENAME/logs/error.log;
  access_log /var/www/html/SITENAME/logs/access.log;
}

Authors

With thanks to Reece Benson for the idea - @reecebenson

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

A script that auto generates and configures a basic PHP site on Ubuntu/Nginx

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors