user nginx ;
worker_processes auto;
error_log /var/log/nginx/error.log;
pid /run/nginx.pid;
include /usr/share/nginx/modules/*.conf;
events {
    worker_connections 1024;
}
http {
log_format  main  '$remote_addr - $remote_user [$time_local] "$request" '
                      '$status $body_bytes_sent "$http_referer" '
                      '"$http_user_agent"';
    access_log  /var/log/nginx/access.log  main;
    server_tokens  off
    sendfile            on;
    tcp_nopush          on;
    tcp_nodelay         on;
    server_tokens off;
    keepalive_timeout   65;
    types_hash_max_size 2048;

    proxy_read_timeout          1400;
    proxy_connect_timeout     1400;
    proxy_send_timeout          1400;
    send_timeout                     1400;

    proxy_buffering off;
include      /etc/nginx/mime.types;
default_type application/octet-stream;

include      /etc/nginx/conf.d/*.conf;
include      /etc/nginx/cloudflare;

#limit_req_zone $binary_remote_addr zone=mylimit:3m rate=3r/s;

geo $HTTP_CF_CONNECTING_IP $geocache {
default 0;
41.252.0.0/14      1 ;  #   LTT 41.252.0.0/14
41.254.64.130      1 ;
41.254.70.0/24    1 ;  #    LTT
41.254.0.0/17      1 ; # Libyan
41.254.38.0/24    1 ; # Libyan
102.164.99.0/24  1 ;102.164.96.0/24  1 ;102.164.97.0/24  1 ;
102.164.96.0/21  1 ; # Libyan
156.38.32.0/19    1 ; # Almadar
156.38.63.0/24    1 ; # Almadar

62.68.0.0/18        1 ; # Libyan
62.240.32.0/19    1 ; # Libyan
91.148.132.48/30 1 ;  #
79.124.7.75  1 ;
# proxy 127.0.0.1/24;
                       }

geo  $remote_addr $allowed {
41.252.0.0/14  0; #LTT
 # 79.124.7.75   0 ; #   proxy
41.254.64.130   0;  #
156.38.52.0/24   0; # Almadar
156.38.32.0/19    0 ; # Almadar
156.38.63.0/24     0 ; # Almadar
102.164.103.0/24  0 ; # Lbyana
102.164.96.0/24	  0 ; # Lbyana
102.164.97.0/24	  0 ; # Lbyana
102.164.99.0/24	  0 ; # Lbyana
102.164.100.0/24  0 ; # Lbyana
102.164.103.0/24  0 ; # Lbyana

 91.148.132.48  0; #Myserver
 15.236.0.0/15  0; 34.64.0.0/11   0;  #Google
 34.144.0.0/13  0; #Google
 34.208.0.0/12  0;
 35.196.0.0/15  0; #Google
 35.224.0.0/14  0; #Google
 66.249.64.0/19 0; #Google
 35.232.0.0/14  0; 35.244.0.0/14  0;
 # 31.13.64.0/18  0;FB
 51.15.0.0/16   0; 54.39.0.0/16   0; 54.195.0.0/16  0; 54.204.0.0/15  0;
 88.99.0.0/16   0; 94.130.0.0/16  0; 104.196.0.0/14 0; 162.158.128.0/22 0;
 167.172.128.0/20 0; 172.98.32.0/24   0; 188.165.0.0/16   0; 192.99.0.0/16    0;
 192.133.76.0/22  0; 213.246.32.0/19  0;
 198.27.64.0/18   0; #OVH
 199.16.156.0/22  0; #Twitter
 199.59.148.0/22  0; #Twitter
 162.158.162.0/24 0; #Cloudflare
 default          1;
}

geo $mee {
41.252.0.0/14     1 ; #LTT
41.254.64.130    1 ; #
156.38.52.0/24   1 ; # Almadar
156.38.32.0/19   1 ; # Almadar
156.38.63.0/24   1 ; # Almadar
 default                0 ;
}


map $http_user_agent $mobile_request {
	default fullversion;
	"~*ipad" mobileversion;
	"~*android.*mobile" mobileversion;
	"~*iphone" mobileversion;
	"~*ipod.*mobile" mobileversion;
	"~*BlackBerry*Mobile Safari" mobileversion;
	"~*BB*Mobile Safari" mobileversion;
	"~*Opera.*Mini/7" mobileversion;
	"~*IEMobile/10.*Touch" mobileversion;
	"~*IEMobile/11.*Touch" mobileversion;
	"~*IEMobile/7.0" mobileversion;
	"~*IEMobile/9.0" mobileversion;
	"~*Firefox.*Mobile" mobileversion;
	"~*webOS" mobileversion;
	"~*android|ip(hone|od)|windows\s+(?:ce|phone)" mobileversion;
	"~*symbian|sonyericsson|samsung|lg|blackberry" mobileversion;
	"~*mobile" mobileversion;
}

fastcgi_cache_path /var/www/cache levels=1:2 keys_zone=microcache:90m max_size=90m inactive=1m;
fastcgi_cache_key $scheme$request_method$host$request_uri$mobile_request;

include  /etc/nginx/facebook   ;  
include  /etc/nginx/twitter       ;

map $request_uri $redirect_fbclid {  "~^(.*?)([?&]fbclid=[a-zA-Z0-9_-]+)$"  $1;  }

include      /etc/nginx/ahmed.conf;

# include  /etc/nginx/facebook;
# certbot  --nginx -d domain.com
#    /etc/nginx/ssl/
#  openssl dhparam -out    /etc/nginx/ssl/mrdasoft.com.pem   2048




server {
server_name  mrdasoft.com;
include      /etc/nginx/cloudflare   ;
location / {
   root   /var/www/mrdasoft.com;
   index index.php   index.html index.htm;
   try_files $uri $uri/ /index.php?$args;
   add_header 'Access-Control-Allow-Origin' "$http_origin" always;
   add_header 'Access-Control-Allow-Credentials' 'true' always;
   add_header Last-Modified $date_gmt;
   add_header Cache-Control 'no-store, no-cache';
   if_modified_since off;
   etag off;
   expires -1;
        }

location ~ \.php$ {
            root           /var/www/mrdasoft.com;
            fastcgi_pass   unix:/run/php-fpm/www.sock;
            fastcgi_index  index.php;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            include        fastcgi.conf;
            #fastcgi_params
        }
location ~ /\.ht  {
            deny  all;
                  }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/mrdasoft.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/mrdasoft.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot

}






server {
server_name  runtv.cc;
include      /etc/nginx/cloudflare   ;
  #include /etc/nginx/BlockUA  ;
   if   (    $http_user_agent  ~*  "OPR/98"    )      {    set $allowed 0;    }
access_log  /var/log/nginx/anime.log   main       ;   #  if=$allowed

location / {
root        /var/www/animes/;
index      index.php    index.html index.htm ;
try_files  $uri   $uri/    /index.php?$args;
if_modified_since off;  etag off;  expires  -1;
add_header Content-Security-Policy "default-src   'self' '*.google.com';" always;    # #xss
add_header Content-Security-Policy "frame-ancestors 'runtv.cc' '*.google.com';";
      }

location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|ogg|ogv|htc)$    {
  root   /var/www/animes;
  expires           1M;
  access_log      off;
  add_header Cache-Control "public";
}
location ~ \.php$ {
 root             /var/www/animes;
location ~ ^/(wp-admin|wp-login\.php) {
allow    41.252.0.0/14 ; #  79.124.7.75
allow    156.38.0.0/18 ; #  156.38.0.0 - 156.38.63.255
allow    156.38.63.0/24 ; #
allow    102.164.103.0/24 ; # Lbyana
allow    102.164.96.0/24	 ; # Lbyana
allow    102.164.97.0/24	 ; # Lbyana
allow    102.164.99.0/24	 ; # Lbyana
allow    102.164.100.0/24 ; # Lbyana
allow    102.164.103.0/24 ; # Lbyana
allow     79.124.7.75     ; #
deny       all                    ; #    allow
	 fastcgi_pass   unix:/run/php-fpm/www.sock;
					  }
    fastcgi_pass   unix:/run/php-fpm/www.sock;
    fastcgi_index  index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi.conf;
        }
location = /xmlrpc.php  {  deny all; }
location ~ ^/wp-json/     {  deny all; }
location ~ /\.ht  {   deny  all;      }

    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/runtv.cc/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/runtv.cc/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}









server {
listen       80;
server_name  vlc0000.com;
location / {
      root /www/vlc10/;
      index index.php   index.html index.htm;
     try_files $uri $uri/ /index.php?$args;
     add_header 'Access-Control-Allow-Origin' "$http_origin" always;
     add_header 'Access-Control-Allow-Credentials' 'true' always;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache';
 if_modified_since off ;   etag off ;    expires -1 ;
          }
location ~ \.php$ {
  root   /www/vlc10/;
  fastcgi_pass   unix:/run/php-fpm/www.sock;
  fastcgi_index  index.php;
  fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
  include        fastcgi.conf;
  fastcgi_read_timeout 3000; ## 
          }
location ~ /\.ht        {      deny  all ;        }
   if ( $allowed  )     {   return 402 ;        }

       }



server {
server_name  64k.live;
include /etc/nginx/cloudflare   ;
#include /etc/nginx/BlockUA  ;
if  ( $http_user_agent  ~*  "OPR/95" )   { set $allowed 0; }
access_log  /var/log/nginx/anime.log   main if=$allowed ;
location / {
root        /var/www/animes/;
index      index.php    index.html index.htm ;
try_files  $uri   $uri/    /index.php?$args;
if_modified_since off;  etag off;  expires  -1;
add_header Content-Security-Policy "default-src   'self' '*.google.com';" always;    # #xss
add_header Content-Security-Policy "frame-ancestors '64k.live' '*.google.com';";
      }
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|ogg|ogv|htc)$    {
  root   /var/www/animes;
  expires           1M;
  access_log      off;
  add_header Cache-Control "public";
}
location ~ \.php$ {
    root             /var/www/animes;
					location ~ ^/(wp-admin|wp-login\.php) {
								 allow    41.252.0.0/14   ; #  79.124.7.75
								 allow    156.38.0.0/18 ; #  156.38.0.0 - 156.38.63.255
								 allow    156.38.63.0/24 ; #
								 allow     79.124.7.75     ; #
								  deny     all                    ; #    allow
								 fastcgi_pass   unix:/run/php-fpm/www.sock;
					  }
    fastcgi_pass   unix:/run/php-fpm/www.sock;
    fastcgi_index  index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi.conf;
        }
location = /xmlrpc.php  {  deny all; }
location ~ ^/wp-json/     {  deny all; }
location ~ /\.ht  {   deny  all;      }
    listen 443 ssl ; # managed by Certbot ipv4only=on
    ssl_certificate /etc/letsencrypt/live/64k.live-0001/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/64k.live-0001/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}



server {
server_name  uypp.64k.live ;
#include /etc/nginx/cloudflare ;
include /etc/nginx/BlockUA  ;
if                       (   $http_user_agent  ~*  "OPR/95"   )   {   set $allowed 0;   }
access_log      /var/log/nginx/anime.log   main   if=$allowed  ;
location / {
root        /var/www/animes2/ ;
index      index.php      index.html index.htm ;
try_files  $uri   $uri/     /index.php?$args   ;
if_modified_since off;
etag off;      expires    -1;
      }
location ~* \.(?:mp4|mkv)$    {
 root                   /var/www/animes2/;
 #limit_req zone=mylimit;
}
location ~* \.(?:jpg|jpeg|gif|png|ico|cur|gz|ogg|ogv|htc)$    {
  root   /var/www/animes;
  expires           1M;
  access_log      off;
  add_header Cache-Control "public";
}
location ~ \.php$ {
    root             /var/www/animes2;
    fastcgi_pass   unix:/run/php-fpm/www.sock;
    fastcgi_index  index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include        fastcgi.conf;
    #fastcgi_params
        }
location = /xmlrpc.php {
    deny all;
}
location ~ /\.ht  {          deny  all;                  }

}








server {
server_name  www.heritagewiki.org heritagewiki.org;
include /etc/nginx/cloudflare;
include    /etc/nginx/BlockUA;
if ( $http_user_agent  ~*  "OPR/95"   ) {  set $allowed 0 ;  }
access_log  /var/log/nginx/heritagewiki.log main if=$allowed;
location / {
      root   /var/www/heritagewiki.org;
      index index.php   index.html index.htm;
# location = /index.php\?title= {#    rewrite .* /?;# }
try_files		 $uri $uri/ @rewrite;
#try_files $uri $uri/ /index.php?$args;
 add_header 'Access-Control-Allow-Origin' "$http_origin" always;
 add_header 'Access-Control-Allow-Credentials' 'true' always;
 add_header Last-Modified $date_gmt;
 add_header Cache-Control 'no-store, no-cache';
 if_modified_since off; etag off; expires -1;
          }
location @rewrite {
		rewrite ^/(.*)$ /index.php;
	}
location ^~ /maintenance/ {
		return 403;
	}
location ~ \.php$ {
              root          /var/www/heritagewiki.org;
              fastcgi_pass   unix:/run/php-fpm/www.sock;
              fastcgi_index  index.php;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              include        fastcgi.conf;
		try_files $uri @rewrite;
          }
location ~ /\.ht  {
              deny  all;
                    }
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/www.heritagewiki.org/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/www.heritagewiki.org/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}


server {
server_name  www.monweekendavienne.com  monweekendavienne.com;
include /etc/nginx/cloudflare ;
include /etc/nginx/BlockUA;
location / {
      root   /var/www/monweekendavienne.com;
      index index.php   index.html index.htm;
     try_files $uri $uri/ /index.php?$args;
     add_header 'Access-Control-Allow-Origin' "$http_origin" always;
     add_header 'Access-Control-Allow-Credentials' 'true' always;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache';
 if_modified_since off;     etag off;     expires -1;
          }
location ~ \.php$ {
   root           /var/www/monweekendavienne.com;
   fastcgi_pass   unix:/run/php-fpm/www.sock;
   fastcgi_index  index.php;
   fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
   include        fastcgi.conf;
          }
location ~ /\.ht  {              deny  all;                    }

listen 443 ssl http2 ;
listen [::]:443 ssl http2 ;
 include snippets/monweekendavienne.com.conf;
 include snippets/ssl-params.conf;
}


server {
server_name  www.revistadestiempos.com revistadestiempos.com;
include /etc/nginx/cloudflare ;
access_log      /var/log/nginx/revistadestiempos.log main if=$allowed;
#include /etc/nginx/BlockUA;
   location / {
      root   /var/www/revistadestiempos.com;
      index index.php   index.html index.htm;
     try_files $uri $uri/ /index.php?$args;
     add_header 'Access-Control-Allow-Origin' "$http_origin" always;
     add_header 'Access-Control-Allow-Credentials' 'true' always;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache';
 if_modified_since off;
     etag off;
     expires -1;
          }


location ~ \.php$ {
              root           /var/www/revistadestiempos.com;
              fastcgi_pass   unix:/run/php-fpm/www.sock;
              fastcgi_index  index.php;
              fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
              include        fastcgi.conf;
              #fastcgi_params
          }


location ~ /\.ht  {
              deny  all;
                    }
 listen 80;
    listen 443 ssl; # managed by Certbot
    ssl_certificate /etc/letsencrypt/live/www.revistadestiempos.com/fullchain.pem; # managed by Certbot
    ssl_certificate_key /etc/letsencrypt/live/www.revistadestiempos.com/privkey.pem; # managed by Certbot
    include /etc/letsencrypt/options-ssl-nginx.conf; # managed by Certbot
    ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; # managed by Certbot
}







server {
listen 80 default_server;
listen [::]:80 default_server;
server_name  79.124.7.75;
root         /var/www;
include /etc/nginx/default.d/*.conf;
location / {        }
error_page 404 /404.html;            location = /40x.html {        }
error_page 500 502 503 504 /50x.html;
location = /50x.html {        }
    }
# End server







##
server {
server_name        coora.best;
include /etc/nginx/cloudflare ;
access_log  /var/log/nginx/coora.log   main if=$allowed ;
if ( $redirect_fbclid ) {      return 301 $redirect_fbclid;    }
 set $isfacebook        Noo      ;
 if (  $facebook  )   {  set $isfacebook        Yess      ;      }
 if (  $twitter   )  {  set $isfacebook        Yess      ;       }
location / {
      root  /var/www/coora.best ;
      index index.php;
     try_files $uri $uri/ /index.php?$args;
     add_header 'Access-Control-Allow-Origin' "$http_origin" always;
     add_header 'Access-Control-Allow-Credentials' 'true' always;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache';
     if_modified_since off;     etag off;     expires -1;
          }
location ~* ([^/]+\.(?:png|jpeg|jpg))$ {      try_files /$1 =404; }
location ~ \.php$ {
		root                 /var/www/coora.best   ;
		fastcgi_pass   unix:/run/php-fpm/www.sock;
		fastcgi_index  index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param facebook  $isfacebook;
		include        fastcgi.conf;
          }
location ~ /\.ht  {              deny  all;                    }
}





##
server {
server_name        upp.coora.best;
include /etc/nginx/cloudflare ;
access_log  /var/log/nginx/coora.log   main if=$allowed ;
if ( $redirect_fbclid ) {      return 301 $redirect_fbclid;    }
 set $isfacebook        Noo      ;
 if (  $facebook  )   {  set $isfacebook        Yess      ;       } 
 if (  $twitter   )  {  set $isfacebook        Yess      ;       } 
location / {
      root  /var/www/coora.best/upp;
      index index.php;
     try_files $uri $uri/ /index.php?$args;
     add_header 'Access-Control-Allow-Origin' "$http_origin" always;
     add_header 'Access-Control-Allow-Credentials' 'true' always;
     add_header Last-Modified $date_gmt;
     add_header Cache-Control 'no-store, no-cache';
     if_modified_since off;     etag off;     expires -1;
          }
location ~* ([^/]+\.(?:png|jpeg|jpg))$ {      try_files /$1 =404; }
location ~ \.php$ {
		root                 /var/www/coora.best/upp   ;
		fastcgi_pass   unix:/run/php-fpm/www.sock;
		fastcgi_index  index.php;
		fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
		fastcgi_param facebook  $isfacebook;
		include        fastcgi.conf;
          }
location ~ /\.ht  {              deny  all;                    }
}










######

server {
	 listen 80;
	 listen [::]:80;
	 server_name  monweekendavienne.com;
	 return 302 https://www.$server_name$request_uri;
}
server {
	 listen 80;
	 listen [::]:80;
	 server_name  www.monweekendavienne.com;
	 return 302 https://$server_name$request_uri;
}

server {
if ($host = shaeenhost.com) {
    return 301 https://$host$request_uri;
    } # managed by Certbot
listen	 80 ;
server_name  shaeenhost.com;
  return 404; # managed by Certbot
}



server {
    if ($host = www.revistadestiempos.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
server_name  www.revistadestiempos.com revistadestiempos.com;
    listen 80;
    return 404; # managed by Certbot
}


server {
    if ($host = www.heritagewiki.org) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


server_name  www.heritagewiki.org heritagewiki.org;
    listen 80;
    return 404; # managed by Certbot


}



server {
if     ($host = 64k.live) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
server_name  64k.live   ;
    listen 80;
    return 404; # managed by Certbot
}







server {
    if ($host = live.al7akaia.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot
server_name        live.al7akaia.com;
    listen 80;
    return 404; # managed by Certbot
}





# End http
 






server {
    if ($host = mrdasoft.com) {
        return 301 https://$host$request_uri;
    } # managed by Certbot


server_name  mrdasoft.com;
    listen 80;
    return 404; # managed by Certbot


}}


