GithubHelp home page GithubHelp logo

sitex.example.com's Introduction

sitex.example.com

A tool for batch creation of web sites.

This set of scripts creates a number of user accounts, virtual hosts and mysql users and databases.

Web site creation script

The websitesmk.sh script creates :

  • a user
  • a home directory
  • a database user
  • a database
  • a dedicated Apache2 virtual host
  • a dedicated PHP FPM pool

All names have the following common base : websiteXX where XX is an integer from 1 to 30 :

  • the users are websiteXX
  • the home directories are /home/websiteXX
  • the databases users are websiteXX
  • the databases are websiteXX
  • the dedicated Apache2 virtual hosts are if the form websiteXX.example.com
  • the dedicated PHP FPM pools are websiteXX

Prerequisites

  • Linux system
  • Apache 2.4
  • MariaDB 15.x
  • PHP 8.x FPM

Configuration

Copy websitesconf.sh.dist as websitesconf.sh and choose appropriate values.

Domain name

Edit websitesconf.sh and change the value of domain_name to choose the domain name of the sites you want to create.

Number of web sites

Edit websitesconf.sh and change the value of websites_count to choose the number of sites you want to create.

Passwords

Edit websitesconf.sh and change the value of user_base_passwd and mysql_passwd_base to choose the password base for the user account and the mysql user.

Virtual host

The template-vhost.conf is a template file for Apache2 vhost. The {username} keyword is replaced with a value generated by the websitesmk.sh script.

The 000-default.conf is the default virtual host file shipped with Apache2. It is not used by the project but is a good starting point.

PHP FPM pool

The template-pool.conf is a template file for PHP FPM pool. The {username} keyword is replaced with a value generated by the websitesmk.sh script.

The www.conf is the default pool file shipped with PHP FPM. It is not used by the project but is a good starting point.

HTML index file

The template-index.html is a template file for HTML index page. The {username} keyword is replaced with a value generated by the websitesmk.sh script.

PHP test file

The template-test.php is a template file for PHP test page. The {username} keyword is not used.

Usage

To create web sites:

sudo ./websitesmk.sh
sudo ./websitespwd.sh

To change passwords:

sudo ./websitespwd.sh

To remove web sites;

sudo ./websitesrm.sh

Tips when using Filezilla

When using the Quickconnect feature, do not forget to specify the network protocol in the Host field. This is necessary if the ssh port is not the default one (ie not 22).

Example:

  • Host: sftp://123.123.123.123
  • Port: 54321

sitex.example.com's People

Contributors

jibundeyare avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.