Git Product home page Git Product logo

lemp-server-install's Introduction

nginx, MariaDB, and PHP in Debian/Ubuntu

Tested in the following distros:

  • Debian 8 (Jessie)
  • Debian 9 (Stretch)
  • Ubuntu 16.04 LTS (Xenial Xerus)
  • Ubuntu 17.10 (Artful Aardvark)
  • Ubuntu 18.04 (Bionic Beaver)
  • Ubuntu 18.10 (Cosmic Cuttlefish)
  • Elementary OS 0.4 (Loki)
  • Elementary OS 5.0 (Juno)

Installation

sudo apt-get install ca-certificates
wget https://raw.githubusercontent.com/mikekatip/lemp-server-install/master/lemp-server-install.sh
chmod +x lemp-server-install.sh
./lemp-server-install.sh
rm lemp-server-install.sh

Domain Management Script

Installation

lemp-server-install.sh will automatically install domain.sh to /usr/bin/domain.

Manual installation is not necessary, but is possible with the following commands:

sudo wget -O /usr/bin/domain https://raw.githubusercontent.com/mikekatip/lemp-server-install/master/usr/local/bin/domain.sh
sudo chmod +x /usr/bin/domain

Usage

Add a Domain

Public Web Server
sudo domain add domain.tld
  • Web Root Directory: /var/www/domain.tld
  • nginx .conf file: /etc/nginx/conf.d/domain.tld.conf
  • Configured for SSL using LetsEncrypt
  • http://domain.tld will be redirected to https://domain.tld
  • http://www.domain.tld will be redirected to https://domain.tld
  • https://www.domain.tld will be redirected to https://domain.tld
Local Web Server
sudo domain add domain.local

If you installed LEMP on your local development machine instead of a public web sever, replace .tld (.com, .net, .org, etc) with .local.

  • Web Root Directory: /var/www/domain.local
  • nginx .conf file: /etc/nginx/conf.d/domain.local.conf
  • /etc/hosts will be updated to point domain.local to 127.0.0.1
  • Not configured for SSL

Remove a Domain

Make sure to make a backup before removing a domain.

sudo domain remove domain.tld
sudo domain remove domain.local
  • Removes Web Root Directory (will not be backed up before deletion)
  • Removes nginx .conf file (will not be backed up before deletion)
  • Restarts nginx

lemp-server-install's People

Contributors

mikekatip 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.