garypang13 4 年之前
父節點
當前提交
799aabcf82

+ 0 - 23
devices/common/files/etc/nginx/conf.d/_lan.conf

@@ -1,23 +0,0 @@
-# default_server for the LAN addresses getting the IPs by:
-# ifstatus lan | jsonfilter -e '@["ipv4-address","ipv6-address"].*.address'
-server {
-	listen 80;
-	listen [::]:80;
-	server_name _lan;
-	index nginx.html index.html index.htm index.php default.html default.htm default.php;
-	root  /www;
-	client_max_body_size 300M;
-	include conf.d/*.locations;
-	
-  location ~ .*\.(gif|jpg|jpeg|png|bmp|swf|flv|mp4|ico)$ {
-    expires 30d;
-    access_log off;
-  }
-  location ~ .*\.(js|css)?$ {
-    expires 7d;
-    access_log off;
-  }
-  location ~ /(\.user\.ini|\.ht|\.git|\.svn|\.project|LICENSE|README\.md) {
-    deny all;
-  }
-}

+ 0 - 25
devices/common/files/etc/nginx/conf.d/custom-domain.conf

@@ -1,25 +0,0 @@
-server {
-	listen 80;
-	server_name custom.domain.com;
-	index nginx.html index.html index.htm index.php default.html default.htm default.php;
-	root  /www;
-	client_max_body_size 300M;
-	include conf.d/*.locations;
-	
-		location = /(robots.txt|favicon.ico) {
-			log_not_found off;
-		}
-
-		location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
-			expires 30d;
-		}
-
-		location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
-			add_header Access-Control-Allow-Origin "*";
-			expires 30d;
-		}
-
-		location ~ /\.(?!well-known) {
-			deny all;
-		}
-}

+ 0 - 25
devices/common/files/etc/nginx/conf.d/luci.locations

@@ -1,25 +0,0 @@
-location /luci {
-		index  index.html;
-		include uwsgi_params;
-		uwsgi_read_timeout 300s;
-		uwsgi_param SERVER_ADDR $server_addr;
-		uwsgi_modifier1 9;
-		uwsgi_pass unix:////var/run/luci-webui.socket;
-}
-location ~ /cgi-(backup|download|upload|exec) {
-		include uwsgi_params;
-		uwsgi_read_timeout 300s;
-		uwsgi_param SERVER_ADDR $server_addr;
-		uwsgi_modifier1 9;
-		uwsgi_pass unix:////var/run/luci-cgi_io.socket;
-}
-
-location /luci-static {
-error_log stderr crit;
-}
-
-location /ubus {
-        ubus_interpreter;
-        ubus_socket_path /var/run/ubus/ubus.sock;
-        ubus_parallel_req 2;
-}

+ 0 - 15
devices/common/files/etc/nginx/conf.d/reverse_proxy.sample

@@ -1,15 +0,0 @@
-server
-    {
-        listen 80;
-        server_name netdata.com;
-		
-        location / {
-		proxy_pass              http://127.0.0.1:19999/;
-		proxy_http_version      1.1;
-		proxy_set_header        X-Forwarded-Host        $server_name:$server_port;
-		proxy_hide_header       Referer;
-		proxy_hide_header       Origin;
-		proxy_set_header        Referer                 '';
-		proxy_set_header        Origin                  '';
-}
-    }

+ 0 - 40
devices/common/files/etc/nginx/conf.d/ssl.conf.sample

@@ -1,40 +0,0 @@
-server
-    {	
-    	listen 80
-        listen 443 ssl http2;
-        #listen [::]:443 ssl;
-        server_name xxx.com;
-        index nginx.html index.html index.htm index.php default.html default.htm default.php;
-        root  /www;
-	if ($ssl_protocol = "") { return 301 https://$host$request_uri; }
-
-	ssl_certificate '/etc/nginx/conf.d/_lan.crt';
-	ssl_certificate_key '/etc/nginx/conf.d/_lan.key';
-	ssl_session_timeout '64m';
-	ssl_protocols TLSv1.2 TLSv1.3;
-        ssl_prefer_server_ciphers on;
-        ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
-	ssl_session_cache 'shared:SSL:10m';
-	
-        #include rewrite/other.conf;
-        #error_page   404   /404.html;
-
-		location = /(robots.txt|favicon.ico) {
-			log_not_found off;
-		}
-
-		location ~* \.(?:css(\.map)?|js(\.map)?|jpe?g|png|gif|ico|cur|heic|webp|tiff?|mp3|m4a|aac|ogg|midi?|wav|mp4|mov|webm|mpe?g|avi|ogv|flv|wmv)$ {
-			expires 30d;
-		}
-
-		location ~* \.(?:svgz?|ttf|ttc|otf|eot|woff2?)$ {
-			add_header Access-Control-Allow-Origin "*";
-			expires 7d;
-		}
-
-		location ~ /\.(?!well-known) {
-			deny all;
-		}
-		
-		include conf.d/*.locations;
-    }

+ 0 - 42
devices/common/files/etc/nginx/conf.d/webdav.conf.sample

@@ -1,42 +0,0 @@
-server
-    {
-        listen 8877;
-        #listen 443 ssl http2;
-        server_name _lan;
-        index index.html index.htm index.php default.html default.htm default.php;
-        root  /data;
-
-        # ssl_certificate /etc/acme/supes.top/fullchain.cer;
-        # ssl_certificate_key /etc/acme/supes.top/supes.top.key;
-	    # ssl_session_timeout '64m';
-	    # ssl_protocols TLSv1.2 TLSv1.3;
-        # ssl_prefer_server_ciphers on;
-        # ssl_ciphers "TLS13-AES-256-GCM-SHA384:TLS13-CHACHA20-POLY1305-SHA256:TLS13-AES-128-GCM-SHA256:TLS13-AES-128-CCM-8-SHA256:TLS13-AES-128-CCM-SHA256:EECDH+CHACHA20:EECDH+CHACHA20-draft:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5";
-	    # ssl_session_cache 'shared:SSL:10m';
-		
-		client_max_body_size 0;
-
-	        location / {
-
-            set $dest $http_destination;
-            if (-d $request_filename) {
-                rewrite ^(.*[^/])$ $1/;
-                set $dest $dest/;
-            }
-            if ($request_method ~ (MOVE|COPY)) {
-                more_set_input_headers 'Destination: $dest';
-            }
-
-            if ($request_method ~ MKCOL) {
-                rewrite ^(.*[^/])$ $1/ break;
-            }
-
-            dav_methods PUT DELETE MKCOL COPY MOVE;
-            dav_ext_methods PROPFIND OPTIONS;
-            dav_access user:rw group:rw all:r;
-            create_full_put_path  on;
-
-            auth_basic "Restricted access";
-            auth_basic_user_file /etc/nginx/htpasswd.conf;
-        }
-}

+ 0 - 1
devices/common/files/etc/nginx/htpasswd.conf

@@ -1 +0,0 @@
-root:fU70Nx.37Ofww

+ 0 - 54
devices/common/files/etc/nginx/nginx.conf

@@ -1,54 +0,0 @@
-# Please consider creating files in /etc/nginx/conf.d/ instead of editing this.
-# For details see https://openwrt.org/docs/guide-user/services/webserver/nginx
-
-worker_processes auto;
-
-user root;
-error_log  /var/log/nginx/nginx_error.log  error; #notice info
-pid /var/run/nginx.pid;
-worker_rlimit_nofile 51200;
-
-events {
-  use epoll;
-  worker_connections 51200;
-  multi_accept on;
-}
-
-http {
-	access_log off;
-	log_format openwrt
-		'$request_method $scheme://$host$request_uri => $status'
-		' (${body_bytes_sent}B in ${request_time}s) <- $http_referer';
-
-  include mime.types;
-  default_type application/octet-stream;
-  server_names_hash_bucket_size 128;
-  client_header_buffer_size 32k;
-  large_client_header_buffers 4 32k;
-  client_max_body_size 512m;
-  client_body_buffer_size 10m;
-  sendfile on;
-  tcp_nopush on;
-  keepalive_timeout 120;
-  server_tokens off;
-  tcp_nodelay on;
-
-  #Gzip Compression
-  gzip on;
-  gzip_buffers 16 8k;
-  gzip_comp_level 6;
-  gzip_http_version 1.1;
-  gzip_min_length 256;
-  gzip_proxied any;
-  gzip_vary on;
-  gzip_types
-    text/xml application/xml application/atom+xml application/rss+xml application/xhtml+xml image/svg+xml
-    text/javascript application/javascript application/x-javascript
-    text/x-json application/json application/x-web-app-manifest+json
-    text/css text/plain text/x-component
-    font/opentype application/x-font-ttf application/vnd.ms-fontobject
-    image/x-icon;
-  gzip_disable "MSIE [1-6]\.(?!.*SV1)";
-
-	include conf.d/*.conf;
-}