ip6.biz/sample-nginx-config/ip6.biz.conf

45 lines
846 B
Plaintext
Raw Normal View History

2021-05-02 20:43:48 +02:00
server {
2021-05-28 16:56:49 +02:00
include sites/ip6.biz/inc/ssl64.conf;
2021-05-02 20:43:48 +02:00
server_name ip6.biz;
2021-05-28 16:56:49 +02:00
root /opt/ip6.biz/src;
2021-05-02 20:43:48 +02:00
index index.html;
location / {
if ($request_uri ~ ^/(.*)\.html) {
return 302 /$1;
}
2021-05-28 16:56:49 +02:00
if ($request_uri ~ ^/.*(\.(php|sh))) {
return 403;
}
2021-05-02 20:43:48 +02:00
try_files $uri $uri.html $uri/ =404;
}
}
server {
2021-05-28 16:56:49 +02:00
include sites/ip6.biz/inc/ssl64.conf;
2021-05-02 20:43:48 +02:00
server_name www.ip6.biz;
2021-05-28 16:56:49 +02:00
return 301 $scheme://ip6.biz$request_uri;
2021-05-02 20:43:48 +02:00
}
server {
2021-05-28 16:56:49 +02:00
include sites/ip6.biz/inc/ssl64.conf;
2021-05-02 20:43:48 +02:00
server_name v4.ip6.biz v6.ip6.biz any.ip6.biz f4.ip6.biz f6.ip6.biz v4.z4.ip6.biz v6.z4.ip6.biz v4.z6.ip6.biz v6.z6.ip6.biz;
2021-05-28 16:56:49 +02:00
root /opt/ip6.biz/src;
2021-05-02 20:43:48 +02:00
2021-05-28 16:56:49 +02:00
#access_log /var/log/nginx/access.log main;
location = / {
rewrite ^ $scheme://$host/plain.php permanent;
}
2021-05-02 20:43:48 +02:00
location / {
return 403;
}
add_header Access-Control-Allow-Origin "https://ip6.biz";
2021-05-28 16:56:49 +02:00
include inc/php.conf;
}