Skip to content

Instantly share code, notes, and snippets.

@centminmod

centminmod/newdomainx.com.conf Secret

Last active Mar 21, 2018
Embed
What would you like to do?
xenforo 2 developer preview newdomainx.com centminmod.com 123.09beta01 based nginx vhost or use vhost generator at https://centminmod.com/vhost.php and select xenforo from drop down menu
# Centmin Mod Getting Started Guide
# must read http://centminmod.com/getstarted.html
# redirect from non-www to www
# uncomment, save file and restart Nginx to enable
# if unsure use return 302 before using return 301
#server {
# listen 80;
# server_name newdomainx.com;
# return 301 $scheme://www.newdomainx.com$request_uri;
# }
server {
server_name newdomainx.com www.newdomainx.com;
# ngx_pagespeed & ngx_pagespeed handler
#include /usr/local/nginx/conf/pagespeed.conf;
#include /usr/local/nginx/conf/pagespeedhandler.conf;
#include /usr/local/nginx/conf/pagespeedstatslog.conf;
#add_header X-Frame-Options SAMEORIGIN;
#add_header X-Xss-Protection "1; mode=block" always;
#add_header X-Content-Type-Options "nosniff" always;
# limit_conn limit_per_ip 16;
# ssi on;
access_log /home/nginx/domains/newdomainx.com/log/access.log main_ext buffer=256k flush=60m;
error_log /home/nginx/domains/newdomainx.com/log/error.log;
# comment out for https://community.centminmod.com/threads/autoprotect-sh-apache-htaccess-check-migration-to-nginx-deny-all.7308/
# or setup .autoprotect-bypass files https://community.centminmod.com/posts/31027/ in /internal_data, /library and /src directories
#include /usr/local/nginx/conf/autoprotect/newdomainx.com/autoprotect-newdomainx.com.conf;
root /home/nginx/domains/newdomainx.com/public;
# uncomment cloudflare.conf include if using cloudflare for
# server and/or vhost site
#include /usr/local/nginx/conf/cloudflare.conf;
include /usr/local/nginx/conf/503include-main.conf;
add_header X-Robots-Tag "noindex, nofollow";
location / {
index index.php index.html index.htm;
try_files $uri $uri/ /index.php?$uri&$args;
}
location /admin.php {
#auth_basic "Private";
#auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
include /usr/local/nginx/conf/php.conf;
#allow 127.0.0.1;
#allow YOURIPADDRESS;
#deny all;
}
location /install/ {
#auth_basic "Private";
#auth_basic_user_file /usr/local/nginx/conf/htpasswd_admin_php;
include /usr/local/nginx/conf/php.conf;
#allow 127.0.0.1;
#allow YOURIPADDRESS;
#deny all;
}
location /internal_data/ {
internal;
#allow 127.0.0.1;
#allow YOURIPADDRESS;
#deny all;
}
location /library/ {
internal;
#allow 127.0.0.1;
#allow YOURIPADDRESS;
#deny all;
}
location /src/ {
internal;
#allow 127.0.0.1;
#allow YOURIPADDRESS;
#deny all;
}
include /usr/local/nginx/conf/staticfiles.conf;
include /usr/local/nginx/conf/php.conf;
include /usr/local/nginx/conf/drop.conf;
#include /usr/local/nginx/conf/errorpage.conf;
include /usr/local/nginx/conf/vts_server.conf;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.