63 lines
2.8 KiB
Plaintext
63 lines
2.8 KiB
Plaintext
|
##### Process http start #######################################################
|
||
|
server {
|
||
|
listen 80;
|
||
|
server_name DOMAIN;
|
||
|
server_tokens off;
|
||
|
root /var/www/html/DOMAIN;
|
||
|
index index.php index.html;
|
||
|
|
||
|
##### Optional include custom Error pages start ############################
|
||
|
include /etc/nginx/nginxsnippets/custom-errors.conf;
|
||
|
##### Optional include custom Error pages stop #############################
|
||
|
|
||
|
##### Optional disable gzip start ##########################################
|
||
|
# gzip off;
|
||
|
##### Optional disable gzip stop ###########################################
|
||
|
|
||
|
##### Optional disable access log start ####################################
|
||
|
# access_log off;
|
||
|
##### Optional disable access log stop #####################################
|
||
|
|
||
|
##### Block Bad referers and bad bots start ################################
|
||
|
if ($bad_referer) { return 444; }
|
||
|
if ($bad_user_agent) { return 444; }
|
||
|
##### Block Bad referers and bad bots stop #################################
|
||
|
|
||
|
##### Optional stuff start #################################################
|
||
|
# include /etc/nginx/nginxsnippets/block-engines.conf;
|
||
|
include /etc/nginx/nginxsnippets/log-exclude.conf;
|
||
|
include /etc/nginx/nginxsnippets/block-htaccess.conf;
|
||
|
include /etc/nginx/nginxsnippets/block-file-access.conf;
|
||
|
##### Optional stuff stop ##################################################
|
||
|
|
||
|
##### Enable fastcgi cache start ###########################################
|
||
|
set $skip_cache 0;
|
||
|
##### Enable fastcgi cache stop ############################################
|
||
|
|
||
|
##### Process content start ################################################
|
||
|
location / {
|
||
|
try_files $uri $uri/ /index.php$is_args$args;
|
||
|
}
|
||
|
##### Process content stop #################################################
|
||
|
|
||
|
##### Wordpress Hardeing start #############################################
|
||
|
include /etc/nginx/nginxsnippets/wphardening.conf;
|
||
|
##### Wordpress Hardeing stop ##############################################
|
||
|
|
||
|
##### Process php start ####################################################
|
||
|
location ~ \.php$ {
|
||
|
# include /etc/nginx/nginxsnippets/proxyheader.conf;
|
||
|
include snippets/fastcgi-php.conf;
|
||
|
fastcgi_pass unix:/var/run/php/phpVERSION-fpm.sock;
|
||
|
include /etc/nginx/nginxsnippets/microcache.conf;
|
||
|
}
|
||
|
##### Process php stop #####################################################
|
||
|
|
||
|
##### Cache js css static content and open files start #####################
|
||
|
include /etc/nginx/nginxsnippets/cache-open-files.conf;
|
||
|
include /etc/nginx/nginxsnippets/cache-statics.conf;
|
||
|
include /etc/nginx/nginxsnippets/cache-js-css.conf;
|
||
|
##### Cache js css static content and open files stop ######################
|
||
|
}
|
||
|
##### Process http stop ########################################################
|