| by Arround The Web

How to Install NGINX on Ubuntu 20.04

NGINX is used by more than 30% of all active websites, which makes it one of the most popular and widely used web servers in the world. Learn how to install NGINX on Ubuntu 20.04 here.
The post How to Install NGINX on Ubuntu 20.04 appeared first on Lin…

Share Button
Read More
| by Arround The Web

Reverse Proxy with Nginx: A Step-by-Step Setup Guide

One of the more popular reverse proxy tools at the moment is Nginx. Although Nginx itself is a web server, it does an outstanding job of serving as a reverse proxy.
This step-by-step tutorial is going to show you how you can easily set up a reverse pro…

Share Button
Read More
| by Arround The Web

How to Install and Configure Caddy Web Server with PHP on Fedora 34 / CentOS 8

Here’s how to get Caddy up and running on your system. Caddy is an open-source web server written in the Go language. It provides HTTP/3 support, TLS v1.3, automatic SSL configuration with Let’s Encrypt, reverse proxy, and supports multiple…

Share Button
Read More
| by Scott Kilroy

apache – watch httpd for connected clients

watch httpd for connected clients watch “netstat -anpt | grep httpd | grep ESTABLISHED|cut -b45-60 | cut -d’:’ -f1 | sort” OR netstat -plan|grep :80|awk {‘print $5’}|cut -d: -f 1| sort|uniq -c | sort -nk 1

Share Button
Read More
| by Scott Kilroy

apache – test mod_evasive is setup correctly

You can use this simple script to test mod_evasive is installed and running. I didn’t write this but forgot where I found it. Sorry for the lack of credit where it’s due. #!/usr/bin/perl # test.pl: small script to test mod_dosevasive’s effectiveness use IO::Socket; use strict; for(0..100) { my($response); my($SOCKET) = new IO::Socket::INET( Proto => “tcp”, PeerAddr=> “w3.fiendishplan.com:80”); if (! defined $SOCKET) { die $!; } print $SOCKET “GET /?$_ HTTP/1.0\n\n”; $response = ; print $response; close($SOCKET); }

Share Button
Read More
| by Scott Kilroy

Apache modrewrite examples

modrewrite rule if you create folder it can be used as a subdomain RewriteCond %{HTTP_HOST} !^www\.website\.com$ RewriteCond %{HTTP_HOST} ^(.*)\.website\.com(.*) [NC] RewriteCond %{DOCUMENT_ROOT}/%1 -d RewriteRule ^(.*)$ http://www.website.com/%1$1 [P,L] requires both mod_rewrite and mod_proxy to be running 1. Forcing www for a domain while preserving subdomains RewriteCond %{HTTP_HOST} ^([a-z.]+)?example\.com$ [NC] RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule .? http://www.%1example.com%{REQUEST_URI} [R=301,L] Site has permanently moved to new domain # domain.com to domain2.com RewriteCond %{HTTP_HOST} ^www.domain.com$ [NC] RewriteRule ^(.*)$ http://www.domain2.com/$1 [R=301,L] RewriteEngine on RewriteCond /your/docroot/%{REQUEST_FILENAME} !-f […]

Share Button
Read More
| by Scott Kilroy

Installing apache mod_evasive on ubuntu

apt-get install libapache2-mod-evasive in /etc/apache2/conf.d create file called modevasive with the following: <code> <ifmodule mod_evasive20.c> DOSHashTableSize 3097 DOSPageCount 2 DOSSiteCount 50 DOSPageInterval 1 DOSSiteInterval 1 DOSBlockingPeriod 10 DOSLogDir /var/log/mod_evasive DOSEmailNotify ADD_EMAIL DOSWhitelist 127.0.0.1 </ifmodule>

Share Button
Read More
| by Scott Kilroy

Nginx with certbot

Remember when setting up certbot using nginx to turn off the line in your config that blocks files that start with . This line: location ~ /\. { access_log off; log_not_found off; deny all; } A good guide can be found here https://www.digitalocean.com/community/tutorials/how-to-secure-nginx-with-let-s-encrypt-on-ubuntu-16-04

Share Button
Read More
| by Scott Kilroy

Test ssl setup

To test ssl is setup correctly run the following: openssl s_client -connect IP_OR_DOMAIN_NAME:443

Share Button
Read More
  • 1
  • 2