Skip to content

Instantly share code, notes, and snippets.

@Anasxrt
Anasxrt / nginx-wordpress.conf
Created August 16, 2022 12:31 — forked from nfsarmento/nginx-wordpress.conf
Harden wordpress security nginx
############ WordPress ####################
# Disable logging for favicon and robots.txt
location = /favicon.ico {
try_files /favicon.ico @empty;
access_log off;
log_not_found off;
expires max;
}
@Anasxrt
Anasxrt / nginx-tuning.md
Created August 9, 2022 15:17 — forked from denji/nginx-tuning.md
NGINX tuning for best performance

Moved to git repository: https://github.com/denji/nginx-tuning

NGINX Tuning For Best Performance

For this configuration you can use web server you like, i decided, because i work mostly with it to use nginx.

Generally, properly configured nginx can handle up to 400K to 500K requests per second (clustered), most what i saw is 50K to 80K (non-clustered) requests per second and 30% CPU load, course, this was 2 x Intel Xeon with HyperThreading enabled, but it can work without problem on slower machines.

You must understand that this config is used in testing environment and not in production so you will need to find a way to implement most of those features best possible for your servers.

@Anasxrt
Anasxrt / install.sh
Last active June 9, 2021 20:20 — forked from mickaelandrieu/install.sh
Install phantomjs/casperjs on GNU/Linux - AlmaLinux release 8.4
#!/bin/bash
# `` sudo sh install.sh ``
# Tested on AlmaLinux release 8.4 (Electric Cheetah) - 4.18.0-305.el8.x86_64
# The code is fork version to get work on latest CentOS 8 like version.
echo Installing dependency
sudo dnf -y install glibc fontconfig freetype freetype-devel fontconfig-devel wget bzip2
echo Installing Phantomjs
cd /usr/local/share
sudo wget https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
Manual and upstart config for AeroFS (aerofs-cli) on Ubuntu 12.04.1 LTS:
# link standard upstart script
cd /etc/init.d
sudo ln -s /lib/init/upstart-job aerofs-cli
# create upstart config for aerofs-cli
sudo nano /etc/init/aerofs-cli.conf
(replace andreas with your desired runtime user)
----