Browse Source

Create example-tor-nginx.conf

lost-skunk 1 year ago
parent
commit
8989f20da9
1 changed files with 36 additions and 0 deletions
  1. 36 0
      example-tor-nginx.conf

+ 36 - 0
example-tor-nginx.conf

@@ -0,0 +1,36 @@
+#replace everything in <> with your own values
+
+events {
+    worker_connections  1024;
+}
+
+http {
+    include       mime.types;
+    default_type  application/octet-stream;
+
+    server {
+        listen       127.0.0.1:<port>;
+        server_name  xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion;
+        allow 127.0.0.1;
+        deny all;
+        server_tokens off;
+        rewrite ^/(.*) http://binternet.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion/$1 permanent;
+    }
+  
+    server {
+        listen       127.0.0.1:<port>;
+        server_name  binternet.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.onion;
+        allow 127.0.0.1;
+        deny all;
+        server_tokens off;
+        root <path_to_Binternet>;
+        index index.php;
+
+        location ~ \.php$ {
+          try_files $uri $uri/ =404;
+          fastcgi_split_path_info ^(.+\.php)(/.+)$;
+          fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
+          include fastcgi.conf;
+        }
+    }
+}