我的 Cloudflare NGINX 配置有幾個問題。有些網站對我有用,有些則不適用,在服務器和 Cloudflare 中具有相同的配置。所以我遇到的主要問題是那些不起作用的域,當它沒有在 Cloudflare 或 NGINX 中配置時,它們會一直重定向到 HTTPS。所以問題是如何修復自動重定向 HTTPS,因為我現在想使用 HTTP。也許社區中有些人有同樣的問題。謝謝!
這里有一些關于我的非作業域raventechnology.es為隱私和攻擊而隱藏的 IP 地址的捕獲。



站點的 Nginx 組態檔:
##
# You should look at the following URL's in order to grasp a solid understanding
# of Nginx configuration files in order to fully unleash the power of Nginx.
# https://www.nginx.com/resources/wiki/start/
# https://www.nginx.com/resources/wiki/start/topics/tutorials/config_pitfalls/
# https://wiki.debian.org/Nginx/DirectoryStructure
#
# In most cases, administrators will remove this file from sites-enabled/ and
# leave it as a reference inside of sites-available where it will continue to be
# updated by the Nginx packaging team.
#
# This file will automatically load configuration files provided by other
# applications, such as Drupal or WordPress. These applications will be made
# available underneath a path with that package name, such as /drupal8.
#
# Please see /usr/share/doc/nginx-doc/examples/ for more detailed examples.
##
# Default server configuration
#
server {
listen 80;
listen [::]:80;
# SSL configuration
#
# listen 443 ssl default_server;
# listen [::]:443 ssl default_server;
#
# Note: You should disable gzip for SSL traffic.
# See: https://bugs.debian.org/773332
#
# Read up on ssl_ciphers to ensure a secure configuration.
# See: https://bugs.debian.org/765782
#
# Self-signed certs generated by the SSL-cert package
# Don't use them in a production server!
#
# include snippets/snakeoil.conf;
root /var/www/html/raventechnology;
# Add index.php to the list if you are using PHP
index index.php index.html;
server_name raventechnology.es www.raventechnology.es;
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
try_files $uri $uri/ /index.php?$args;
}
# pass PHP scripts to FastCGI server
#
location ~ \.php$ {
include snippets/fastcgi-php.conf;
# With php-fpm (or other unix sockets):
fastcgi_pass unix:/run/php/php8.0-fpm.sock;
}
# deny access to .htaccess files, if Apache's document root
# concurs with Nginx's one
#
#location ~ /\.ht {
# deny all;
#}
}
uj5u.com熱心網友回復:
對于上面的域,似乎在某些時候啟用了HSTS。這意味著您的網站已預先加載到瀏覽器串列中,告訴瀏覽器它必須通過 HTTPS 加載。這意味著網站必須HTTPS在 HSTS 政策到期之前提供服務。

轉載請註明出處,本文鏈接:https://www.uj5u.com/gongcheng/408320.html
標籤:
上一篇:我如何通過js保護我的index.html網站,所以我只能在我的電腦上打開它?
下一篇:Django顯示源代碼而不是網頁
