New on LowEndTalk? Please Register and read our Community Rules.
good guide for setting up a webserver on VPS
Could you please point me to a good guide for setting up a webserver on a VPS, ideally on Debian 10? The setup should be well secured. Command line preferred rather than some kind of control panel. The installation needs to include ability to set up several domains and subdomains, PHP and Let's Encrypt, but there is no need for SQL, email or anything else.
Edit: given the initial responses I should clarify that I need a good guides for this. Most guides are either incomplete and/or insecure and/or include installation of stuff that is not needed.
Comments
For basic setup like this you could googling. All result should be similar to your request.
Just Google Debian 10 LAMP or LEMP for nginx.
You need to open a topic for this? There's like a million guides.
https://wiki.debian.org/Nginx
https://wiki.debian.org/LetsEncrypt
https://wiki.debian.org/PHP
Just look for any LAMP/LEMP tutorial but skip the MySQL stuff
This one:
https://openlitespeed.org/kb/1-click-install/
I am not sure what is your experience level with command line administration because many of the control panels implement good security configurations out of the box and are automatically updated. I sense that you are probably still starting out that's why you need guides. If you are not making a production server then it is probably fine, but if you are, maybe you can try a no-frills panel instead, such as KeyHelp.
I am quite comfortable with the command line for other tasks, but I haven't done any self hosting. The reason why I am trying to avoid control panels is that if I need to redo something or deploy similar setup on another server, it is much easier to use a (perhaps modified) script rather that trying to write down each and every option clicked on some kind of web interface. Another reason for not wanting control panels is that they use resources on the machine so more powerful machine would be needed which is unnecessary for light websites that I need to host. Keyhelp requires 1GB of RAM which and there is really no need for that much power to host some light websites.
My top three choices (in order)
Thanks! These are the types of tools that I am looking for.
I've been using Caddy that is secure by default and handles TLS certificates automatically.
https://caddyserver.com/docs/install
PHP-FPM needs to be installed separately.
Caddy has a built-in directive to connect to PHP-FPM.
https://caddyserver.com/docs/caddyfile/directives
DigitalOcean tutorials are pretty good
You can find a lot LAMP or LNMP scripts on github
https://github.com/teddysun/lamp
for exampleIndeed there are many scripts on github but not all of them are good. Do you have experience with this one?
Here is a stupid easy way to do it :
wget http://software.virtualmin.com/gpl/scripts/install.sh -O /root/virtualmin-install.sh
sh /root/virtualmin-install.sh
This installs virtualmin package with everything u need. When done, go to https://ip:10000, follow the setup, create a virtual server and ure online. I host 100s of websites using that
TinyCP? It's running brilliantly on 256MB RAM. You select what you want to install - by default no database, for example.
@lpn actually yes, it's simple and clean
But first of all when you start server, there are a few configuration steps that you should take on as part of the basic setup. This will increase the security and usability of your server. Create user account with regular account privileges and so on...
Also very popular scripts on github is
https://github.com/centminmod/centminmod/
https://github.com/oneinstack/lnmp
I don't want to sound overly rude but its quite clear your a beginner and there are two things you could do
If this isn't for production:
Find a cheap vps that includes a control panel like direct admin.... little creek hosting recently had an offer set it up and learn (default auto install of direct admin installs csf firewall and is a start to securing the server, the next would be using a none standard ssh por, disabling root login etc etc)
If this is for production:
Speak to a managed VPS provider and let them do all the hard work... nexusbytes are amazing and Jay is very helpful there are others but low cost and managed dont really go together (Jay has a pretty good niche on this)
Chip
Depends on your definition of a beginner. As I said, I have no experience in webhosting but have plenty using the command line. If I were a beginner I would be looking for a control panel or for Wordpress hosting.