User Tools

Site Tools


create-website

Create a new Website

Creating a Database

There is a script named /root/bin/create_db that will create a new database and DB user. Use it each time you need a new database created. It writes output into /root/var/create_db-*.txt files so you'll always have a record of what db/user/passwd go together.

Creating a Website

There is a script named /root/bin/create-site that will create a new directory in /var/www/webapps, and place a conf file in /etc/httpd/sites. The conf file needs edited as it points to the webapps/coming-soon directory.

Ideal workflow for creating a site

  1. Create a new site by using /root/bin/create-site script
    1. Script will create a new directory in /var/www/webapps
    2. Script will create a new conf file in /etc/httpd/sites
  2. Copy site content into webapps directory
  3. If site uses a database:
    1. Create new database and user with script /root/bin/create-db.
    2. Populate database from a dump file with command “mysql -u username -p dbname < dbfile.sql
  4. Add the site config to /etc/httpd/sites; restart httpd
  5. Update nameserver
  6. Run certbot to get https certificate
  7. Access the content from the web and see if it works.
create-website.txt · Last modified: 2019/07/03 09:29 (external edit)