B
B
BorodinAtamanov2021-09-04 15:52:27
linux
BorodinAtamanov, 2021-09-04 15:52:27

How to automate setup of Debian 11, Apache2 (+Nginx), Php, Mysql for production web server?

In order to have an ssh server, reasonable iptables, fail2ban rules are configured, backups of databases and sites were made by cron. Updates configured.
So that Apache2 already has modules for https sites, mod_rewrite, user rights differentiation, etc.

I want to save time on setup.

Are there ready made builds? Other options that allow you to enable and configure everything by running one script?

Answer the question

In order to leave comments, you need to log in

5 answer(s)
A
Alexey Dmitriev, 2021-09-04
@SignFinder

Ansible
First you really need to study it and write a rulebook

D
Drno, 2021-09-04
@Drno

I just raise the virtual machine. There everything is set up and checked in order.
Put these commands in your bash script...

S
SagePtr, 2021-09-04
@SagePtr

The easiest way is to duplicate all commands for configuration in a bash script.
And then, when you need to set up a new server, you just execute this script.
At worst - into a text file, and then copy-paste to the terminal from there.

V
Victor Taran, 2021-09-04
@shambler81

ispconfig3 + own bash script
vestacp - in 1 click
braynicp
aapanel
bitrixvm and so on
From above you write a bash script and that's it

D
Dmitriy Loginov, 2021-09-06
@caramingo

If you deploy to a VM, then they can be cloned by minimally changing the server IP settings, hostname or something else.
If you deploy to the same hardware, then the servers can also be cloned by Acronis, Clonzilla and others.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question