Skip to content

A simple Bash script for creating a standard structure for all websites. Very usefull if are going to manage a webserver without Cpanel or similar software.

License

Notifications You must be signed in to change notification settings

sedax90/Automatic-web-root-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Web Root Generator

A simple Bash script for creating a standard structure for all websites. Very usefull if are going to manage a webserver without Cpanel or similar software.

It creates a new folder in /var/www/SITENAME/public_html (or wherever you want, just edit the configuration file), with a user assigned (as home) and a log directory inside it (with all logs symlinked to /var/log folder). It also generates the virtual host file for apache and reload the apache service.

At the end of the process creates an index.html page, based on the configuration template files.

Instructions

Basic installation
git clone https://github.com/CRYX2/Automatic-web-root-generator.git awrg 
sudo mv awrg /etc/awrg
sudo chmod +x /etc/awrg/add_vhost.sh
sudo ln -s /etc/awrg/add_vhost.sh /usr/local/sbin/add_vhost
Edit configuration
sudo cp /etc/awrg/awrg.cnf.DEFAULT /etc/awrg/awrg.cnf
sudo vi /etc/awrg/awrg.cnf

Check all settings for reflecting your configuration

How to use

sudo add_vhost

Enjoy :)

PS. Actually it works only with bash, NOT with fish or zsh

Screenshots

sc1

sc1

sc1

About

A simple Bash script for creating a standard structure for all websites. Very usefull if are going to manage a webserver without Cpanel or similar software.

Resources

License

Stars

Watchers

Forks

Packages

No packages published