Skip to content

Instantly share code, notes, and snippets.

View goregrish's full-sized avatar
🇬🇬

D.O.A. goregrish

🇬🇬
  • someplace nice
View GitHub Profile
@goregrish
goregrish / secure_link.md
Last active November 16, 2024 04:51
Nginx ngx_http_secure_link_module and PHP
@goregrish
goregrish / php-fpm.md
Last active April 5, 2021 11:47
php-fpm pool xenforo forum - 15,000 Unique Visitors per day
[pooluser]
listen = 127.0.0.1:9001
user = pooluser
group = users
request_slowlog_timeout = 5s
slowlog = /var/log/php-fpm/slowlog-domain.log
listen.allowed_clients = 127.0.0.1

pm = ondemand
@goregrish
goregrish / config.php
Last active April 5, 2021 10:57
Xenforo define different attachment locations and add basic redis support (using xon's redis add-on)
<?php
# $config['enableListeners'] = false;
$config['db']['host'] = 'localhost';
$config['db']['port'] = '3306';
$config['db']['username'] = '';
$config['db']['password'] = '';
$config['db']['dbname'] = '';
$config['db']['socket'] = null;
$config['fullUnicode'] = true; #unicode emotes
@goregrish
goregrish / nginx.conf
Last active October 30, 2023 13:39
Xenforo forum (cloudflare enabled) nginx.conf for virtual hosting domains from /etc/nginx/domains/ | handles 15,000 Unique Visitors per day
user nginx nginx;
worker_processes auto; #some last versions calculate it automatically
# number of file descriptors used for nginx
# the limit for the maximum FDs on the server is usually set by the OS.
# if you don't set FD's then OS settings will be used which is by default 2000
worker_rlimit_nofile 100000;
# only log critical errors
@goregrish
goregrish / mydomain.conf
Last active October 30, 2023 13:40
Xenforo Nginx Virtual Domain Config SSL only | provide your SSL cert details twice here from include, example: /etc/nginx/snippets/ssl.conf
server {
listen 80;
server_name www.mydomain.com mydomain.com;
return 301 https://mydomain.com$request_uri;
}
server {
listen 443 ssl;
server_name www.mydomain.com;
# managed by Certbot stuff
@goregrish
goregrish / my.cnf
Last active April 5, 2021 11:30
Xenforo Database MariaDB my.cnf | handles 15,000 Unique Visitors per day
#
# This group is read both by the client and the server
# use it for options that affect everything
#
[client-server]
# This will be passed to all MariaDB clients
[client]
# The MariaDB server