This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# ... | |
# files starting with .dot | |
# | |
location ~ /\. { | |
deny all; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# ... | |
location ~ \.php$ { | |
internal; | |
root /path; | |
# All requests to default > /index.php |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name static.domain.tld; | |
# Logs | |
# | |
error_log /var/www/logs/nginx_errors.log error; | |
access_log off; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
# ... | |
location ~ \.php$ { | |
internal; | |
root /path/; | |
# All requests to default > /index.php | |
try_files index.php =404; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Look for client IP in the X-Forwarded-For header | |
real_ip_header X-Forwarded-For; | |
# Ignore trusted IPs | |
real_ip_recursive on; | |
# Trusted list | |
set_real_ip_from 199.27.128.0/21; | |
set_real_ip_from 173.245.48.0/20; | |
set_real_ip_from 103.21.244.0/22; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
user nginx; | |
# one(1) worker or equal the number of _real_ cpu cores. 4=4 core cpu | |
worker_processes 4; | |
# renice workers to reduce priority compared to system processes for | |
# machine health. worst case nginx will get ~25% system resources at nice=15 | |
worker_priority -5; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[mysqld] | |
datadir=/var/lib/mysql | |
socket=/var/lib/mysql/mysql.sock | |
# Disabling symbolic-links is recommended to prevent assorted security risks | |
symbolic-links=0 | |
# Settings user and group are ignored when systemd is used (fedora >= 15). | |
# If you need to run mysqld under a different user or group, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
server { | |
listen 80; | |
server_name ~^(?<app>.+)\.localhost$; | |
root /Users/user/www/$app/; | |
index index.html index.php; | |
location / { | |
try_files $uri $uri/ /index.php; |