Git Product home page Git Product logo

ansible-web-server-debian's Introduction

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 Linux PHP MariaDB Nginx Apache

Author

This Ansible Ansible Playbook was made by Stephen 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:

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.

ansible-web-server-debian's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ansible-web-server-debian's Issues

mDNS Flood

Hi,

I have checked this ansible and testet it in a single virtual server.

The VM was attacked by a lot of known Vulnerabilities.
Do you have more information about why this could be?

Thanks

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.