女黑客安全网nginx配置文件泄露事件-女黑客 - Powered by Discuz! Archiver

nvhack 发表于 2019-11-15 11:44:22

女黑客安全网nginx配置文件泄露事件

nginx 配置,我好难啊:'(server{
      listen 443;
      server_name nvhack.com;
      rewrite ^(.*)$ https://www.${server_name}$1 permanent;   
}
server {
      listen       80;
      root /home/wwwroot/nvhack_com/public_html;
      server_name nvhack.com www.nvhack.com;
      rewrite ^(.*)$ https://www.${server_name}$1 permanent;
      indexindex.html index.php index.htm;
      error_page400 /errpage/400.html;
      error_page403 /errpage/403.html;
      error_page404 /errpage/404.html;
      error_page503 /errpage/503.html;
      location ~ \.php(.*)$ {
                fastcgi_passunix:/tmp/php-70-cgi.sock;
                fastcgi_indexindex.php;
                fastcgi_paramSCRIPT_FILENAME$DOCUMENT_ROOT$fastcgi_script_name;
                fastcgi_param PATH_INFO $2;
                include fcgi.conf;
      }
      location ~ /\.ht {
                denyall;
      }
      location / {
               try_files $uri $uri/ /?$args;
      }
}

server {
      listen       443 default_server ssl;
      server_name www.nvhack.com;
      root /home/wwwroot/nvhack_com/public_html;
      ssl                  on;
      ssl_certificate      cert/nvhack.com.pem;
      ssl_certificate_keycert/nvhack.com.key;
      ssl_prefer_server_ciphers on;
      ssl_session_timeout 10m;
      ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
      ssl_ciphers EECDH+CHACHA20:EECDH+AES128:RSA+AES128:EECDH+AES256:RSA+AES256:EECDH+3DES:RSA+3DES:!MD5;
      
      indexindex.html index.php index.htm;
      error_page400 /errpage/400.html;
      error_page403 /errpage/403.html;
      error_page404 /errpage/404.html;
      error_page503 /errpage/503.html;
      location ~ \.php(.*)$ {
                fastcgi_passunix:/tmp/php-70-cgi.sock;
                fastcgi_indexindex.php;
                fastcgi_paramSCRIPT_FILENAME$DOCUMENT_ROOT$fastcgi_script_name;
                fastcgi_param PATH_INFO $2;
                include fcgi.conf;
      }
      location ~ /\.ht {
                denyall;
      }
      location / {
               try_files $uri $uri/ /?$args;
      }
}


另外非Https用下面这个
server {
      listen 80;
      server_name nanhack.com;
      return 301 http://www.nanhack.com$request_uri;
}
server {
      listen       80;
      root /home/wwwroot/nanhack_com/public_html;
      server_name www.nanhack.com;
      indexindex.html index.php index.htm;
      error_page400 /errpage/400.html;
      error_page403 /errpage/403.html;
      error_page404 /errpage/404.html;
      error_page503 /errpage/503.html;
      location ~* ^/payload/upload/uploads/.*\.(php|php5)$
    {
      #deny all;
                rewrite ^/ http://www.bihuo.cn/webshell/index.php;
    }
      location ~ \.php(.*)$ {
                fastcgi_passunix:/tmp/php-71-cgi.sock;
                fastcgi_indexindex.php;
                fastcgi_paramSCRIPT_FILENAME$DOCUMENT_ROOT$fastcgi_script_name;
                fastcgi_param PATH_INFO $2;
                include fcgi.conf;
      }
      location ~ /\.ht {
                denyall;
      }
      location / {
               try_files $uri $uri/ /?$args;
      }
}





页: [1]
查看完整版本: 女黑客安全网nginx配置文件泄露事件