• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

Perfect Ubuntu 20 Nginx Web Server

simplysexyboy

Well-known member
Trusted Uploader
Oct 24, 2020
639
935
93
U.S.A
Hey Folks,

This thread was created for special requests from Babiato family members. We had a giveaway for Perfect Ubuntu 20 Nginx web server installation. This thread created for them when facing issues will post here, so not only for them also for babiato Community, who wants to run their own server, can see and study.

Winner :
Silva
gwdwdw
vijihel
rozbeh1212
tegek
guguk
bichthao
die2mrw007
mainone
actnow
Akash Golder
Ayobami
cybercliff
ChintanBhat
swa413
jhaycy17
Cyanide
wibuthemes
hellearth
rika_angelica
abaeakili
billasilvan
runtah17
tuwes29
johnwick2614
Linust
lara007
latestdown
Hygine
Aceee
jong07
Chicano
prodsan
flux88
GodDevil
luffy101
ultimator
sashikanta
flux88
underwater
panthchristian4990
jong07



Giveaway Link: FINISHED !!!


Installation after the server will look like this. Check out the speed: HERE, there is no minification or boosting plugins or js something.

APP will be installed:

  • Nginx (with HTTP/2 enabled) 1.18
  • PHP-FPM 7.2/7.3/7.4?
  • MySQL 8.0 or MariaDB 10.4 (depending on what you choose when you provision the server)
  • Redis 5.0
  • Git
  • Composer
  • WP-CLI
  • Certbot (for Let’s Encrypt TLS/SSL certificates)
  • UFW (firewall)
  • Fail2ban
Configuration and Tweaks:
  • PHP, PHP FPM, opcache
  • Nginx General Boost Conf
  • Fast CGI Cache Boost
  • Redis Boost
  • MariaDB MySQL Tuner ( Boost )
  • WordPress Config Tweak
  • Real Cron Job, Disable WP Cron!
  • Server-side Webp Serve ( With EWWW plugins )

FastCGI Cache Will be exclude :
  • Validation date: 7 days caching
  1. wp-.*.php
  2. /feed/
  3. index.php
  4. sitemap(_index)?.xml
  5. wp-comments-popup.php
  6. wp-links-opml.php
  7. wp-locations.php
  8. /cart.*
  9. /basket.*
  10. /checkout.*
  11. /my-account.*
  12. /offer.*
  13. /order-received.*
  14. /order-confirmed.*
  15. /.well-know.*
  16. /store.*
  17. /addons.*

Server Side Protection

  1. XMLRPC,
  2. WPlogin Limitation
  3. Spam
  4. SQL Injection
  5. Bad Agent Blocking
  6. Nginx Server Harding
  7. Redis ( closing outside port )
  8. PHP hardening
  9. Extra directory protections.

DO NOT INSTALL PLUGINS :
  1. SSL
  2. Limit Login
  3. ANY CACHING PLUGIN

Install this plugin:
  1. Query Monitor
  2. Server IP & Memory Usage Display
  3. WP Control
  4. WP OPcache



Disclaimer: READY CAREFULLY
  1. I don't promise to answer questions.
  2. I could be lately answer questions.
  3. IF you have installed another package or app to your server, I don't promise to answer questions. Since the installed package, I don't know I can not give the right answer.
  4. If you don't have Amazon credits or a google account, I can not spin up an instance, so please get or do not send me a PM.
  5. All the installation will be together, so I can not do it another time. If you are not yet ready, I'm sorry you lost your chance.
  6. I do not answer the WP question since many people uploading many plugins and page builders can make your website slow like the turtle and be hacked too...
  7. After I have transferred to all your credentials, you should change all your passwords. I do not respond. Once I have handover to you, I will no longer behave access.
  8. It would be best if you kept an eye on your server updates. I will set a cron job, making an update for only security updates.
 
Important notice

I highly suggest after the installation do not install those software to your server

control panel
Phpmyadmin
Memcached or memcache
Any daemon
Netstat or any performance matrix
Just leave at is it 😬
 
  • Love
Reactions: jong07
Do not Install Any Rate Limit Plugins, I have added manual Configuration to the Nginx Server Block
it means who is trying to login more then 4 to 9 times it will redirect to 444.

try my website login page brute force : https://easyecommerce.tools/wp-login.php


Code:
Code:
###
# Rate Limit for wp-login.php
###

location = /wp-login.php {
limit_req zone=one burst=2 nodelay;
limit_req_status 444;
include fastcgi.conf;
fastcgi_pass unix:/run/php/php7.4-idealrx.sock;
include sites-available/idealrx.biz/location/*;
}

Capture.JPG
 
Last edited:
  • Like
Reactions: jong07
Your server configurated nginx Server block serving for WEBP images.

Now you can use the EWWW plugin directly no Configuration needed.

Code:
Code:
# WEbp Handler for EWWW

location ~* ^.+\.(png|jpe?g)$ {
  add_header Vary Accept;
  try_files $uri$webp_suffix $uri =404;
}
 
Last edited:
  • Like
Reactions: jong07
For CDN, please use WP Offload Media,
WP offload media working with EWWW Flawlessly.


Your Server APP Configured.

Redis :
Memory Ram increased to 256 MB
ALL FYU: meaning is start from the oldest data deletes if acceded 256MB.

PHP:
Memory incrested to 256 MB
Opcache Enabled
Opcache Memory 212MB
Opcache String 32MB

FPM:
Pools are configured Automatically
If your site traffic spikes will automatically increase the PHP FPM worker.

WP:
WordPress debugging mode enabled
WP Memory increased to 256



I don't suggest to increase those numbers. Its not like more is better not working this way.
 
Last edited:
@simplysexyboy Sir, do I need to configure first my NGINX with my domain to show it in my IP, not in the AWS ec2 server?

Could you please stop calling me a Sir?

Sorry, I didn't follow what you are saying? Do you want to add another domain? Or you want to show your Domain name as a default web server domain name?
 
Could you please stop calling me a Sir?

Sorry, I didn't follow what you are saying? Do you want to add another domain? Or you want to show your Domain name as a default web server domain name?

okie hehe, i want the 1st picture to be 2nd picture what step im lacking? how do i connect my domain to my server, do it really need domain to show?

ip add.PNG nginx pic.PNG
 
the second picture already binded correctly. You just need to symlink your site folder.

Your site folder under the Sudo user root folder call Sites

By the way, please watch the Courses inside everything has.
 
@simplysexyboy please see my steps to see why my result is refused to connect.

1) in the EC2 instance
I set up my server ubuntu
*security group ssh, HTTP, HTTPS : 0.0.0.0/0

2) Putty login using ssh keys

sudo ufw status
sudo apt install ufw
sudo ufw allow ssh
allow ufw HTTP
allow ufw HTTPS
sudo ufw enable

sudo apt update
sudo apt upgrade
sudo apt install Nginx libnginx-mod--HTTP-headers-more-filter

The next step opens refused.png instance 1.PNG the browser then HTTPS/server IP address but then it's refused to connect.
 
@simplysexyboy please see my steps to see why my result is refused to connect.

1) in the EC2 instance
I set up my server ubuntu
*security group ssh, HTTP, HTTPS : 0.0.0.0/0

2) Putty login using ssh keys

sudo ufw status
sudo apt install ufw
sudo ufw allow ssh
allow ufw HTTP
allow ufw HTTPS
sudo ufw enable

sudo apt update
sudo apt upgrade
sudo apt install Nginx libnginx-mod--HTTP-headers-more-filter

The next step opens refused.png instance 1.PNG the browser then HTTPS/server IP address but then it's refused to connect.

Please do not share your public ip next time.

The reason port did not open correctly,
Go back to your AWS Panel.
Security Group
Click your attached Security Policies.
Then Go Down
Right side add new HTTP, add new HTTPS
Save
go back to dashboard of EC2
Restart your ec2
try to ssh again.
 
  • Like
Reactions: cneto
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock