Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/s-damian/ansible-web-server-debian
Ansible - Web Server Nginx / Apache - Deploy on Debian
https://github.com/s-damian/ansible-web-server-debian
ansible apache debian deploy deployment deployment-automation lamp lamp-server lamp-stack lemp lemp-server lemp-stack linux mariadb nginx php webserver
Last synced: about 2 months ago
JSON representation
Ansible - Web Server Nginx / Apache - Deploy on Debian
- Host: GitHub
- URL: https://github.com/s-damian/ansible-web-server-debian
- Owner: s-damian
- Created: 2022-08-14T03:32:56.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-01-29T09:36:01.000Z (almost 2 years ago)
- Last Synced: 2024-07-30T19:24:04.815Z (6 months ago)
- Topics: ansible, apache, debian, deploy, deployment, deployment-automation, lamp, lamp-server, lamp-stack, lemp, lemp-server, lemp-stack, linux, mariadb, nginx, php, webserver
- Language: Jinja
- Homepage:
- Size: 60.5 KB
- Stars: 7
- Watchers: 1
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Ansible - Nginx or Apache Web Server
## Ansible Playbook : LEMP or LAMP Server on Debian
This Ansible script allows you to automate the configuration of a **LEMP web server** or a **LAMP web server** on **Debian 11** server.
These **Ansible roles** will automate the deployment for you:
* Install **Nginx** or **Apache**
* Install **MariaDB** (supported versions: 10.5, 10.6, 10.7, 10.8, 10.9, 10.10)
* Install **PHP** (supported versions: 8.0, 8.1, 8.2)
* Install **PhpMyAdmin**
* Create your Nginx / Apache Virtual Hosts (one per domain)
* Create your MariaDB databases (one per domain)
* Preparing the skeleton of your websites[![Ansible](https://raw.githubusercontent.com/s-damian/medias/main/technos/ansible.webp)](https://github.com/s-damian)
[![Linux](https://raw.githubusercontent.com/s-damian/medias/main/technos/linux.webp)](https://github.com/s-damian)
[![PHP](https://raw.githubusercontent.com/s-damian/medias/main/technos/php.webp)](https://github.com/s-damian)
[![MariaDB](https://raw.githubusercontent.com/s-damian/medias/main/technos/mariadb.webp)](https://github.com/s-damian)
[![Nginx](https://raw.githubusercontent.com/s-damian/medias/main/technos/nginx.webp)](https://github.com/s-damian)
[![Apache](https://raw.githubusercontent.com/s-damian/medias/main/technos/apache.webp)](https://github.com/s-damian)### Author
This Ansible Ansible Playbook was made by [Stephen Damian](https://github.com/s-damian)
## Getting Started
### Requirements:
* Debian 11
* SSH root access### Introduction:
This example is configured for a Debian **local server**.
If you want to configure there for a Debian **remote server**, you need to configure the ```ansible/hosts``` file.
### Create your home user (if it doesn't exist yet):
```
adduser user_test
```### Update and upgrade:
```
sudo apt-get update && sudo apt-get upgrade
```### Install Ansible:
```
sudo apt-get install ansible
```### Configure web-server.yml:
You need to configure your ```ansible/web-server.yml``` file.
You must configure at least all the ```REQUIRED``` lines.
### Ansible folder:
Send the ```ansible``` folder present in this package to the ```/etc``` folder of your Debian server.
### Run the Ansible script:
```
ansible-playbook -i /etc/ansible/hosts /etc/ansible/web-server.yml
```### See the result:
* www.your-domain.com
* www.your-domain.com/phpmyadmin## Go further
### Security
You must change the path of PhpMyAdmin, or remove PhpMyAdmin from public access.
Don't forget to secure your server with iptables, fail2ban, etc.
You can Configure SSL for your websites (with Certbot for example).
### Performance
To improve performance, you can add cache to your Nginx / Apache configuration.
### Send emails
To make your server able to send mails, you can use postfix.