Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/http/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Apache禁用https重定向以续订证书_Http_Ssl_Redirect_Https_Apache2 - Fatal编程技术网

Apache禁用https重定向以续订证书

Apache禁用https重定向以续订证书,http,ssl,redirect,https,apache2,Http,Ssl,Redirect,Https,Apache2,我需要更新我的letsencrypt证书。为此,我需要禁用http到https重定向。 然而,我无法做到这一点 我正在运行Apache和Raspbian。以下是我的可用站点/000-default.conf: <VirtualHost *:80> ServerAdmin example@mail.com DocumentRoot "/var/www/html/tennis/public" DirectoryIndex index.php <Di

我需要更新我的letsencrypt证书。为此,我需要禁用http到https重定向。 然而,我无法做到这一点

我正在运行Apache和Raspbian。以下是我的可用站点/000-default.conf:

<VirtualHost *:80>
    ServerAdmin example@mail.com
    DocumentRoot "/var/www/html/tennis/public"

    DirectoryIndex index.php
    <Directory /var/www/html/tennis/public>
            Options All
            AllowOverride All
            Order Allow,Deny
            Allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined

    #RewriteEngine on
    #RewriteCond %{SERVER_NAME} = my.domain.com
    #RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>

服务器管理员example@mail.com
DocumentRoot“/var/www/html/netsing/public”
DirectoryIndex.php
选项全部
允许超越所有
命令允许,拒绝
通融
ErrorLog${APACHE_LOG_DIR}/error.LOG
CustomLog${APACHE\u LOG\u DIR}/access.LOG组合
#重新启动发动机
#RewriteCond%{SERVER_NAME}=my.domain.com
#重写规则^https://%{SERVER_NAME}%{REQUEST_URI}[END,NE,R=permanent]
我认为注释最后三行可以解决这个问题,但是我仍然得到一个301重定向到https

我的.htaccess如下所示:

<IfModule mod_rewrite.c>
<IfModule mod_negotiation.c>
    Options -MultiViews -Indexes
</IfModule>

#Header always edit Set-Cookie (.*) $1;Secure
Header always append X-Frame-Options DENY
#Header set Connection keep-alive

RewriteEngine On

# Handle Authorization Header
RewriteCond %{HTTP:Authorization} .
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

# Redirect Trailing Slashes If Not A Folder...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (.+)/$
RewriteRule ^ %1 [L,R=301]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]
</IfModule>

选项-多视图-索引
#标题始终编辑集Cookie(.*)$1;保护
标题始终附加X-Frame-Options拒绝
#标题集连接保持活动状态
重新启动发动机
#句柄授权头
RewriteCond%{HTTP:Authorization}。
重写规则。*-[E=HTTP\U授权:%{HTTP:AUTHORIZATION}]
#如果不是文件夹,则重定向尾部斜杠。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_URI}(+)/$
重写规则^1[L,R=301]
#处理前控制器。。。
重写cond%{REQUEST_FILENAME}-D
重写cond%{REQUEST_FILENAME}-F
重写规则^index.php[L]
如果我使用IP地址,我可以通过http访问该网站,因此我知道http仍在工作


所以我不知道在哪一点上我仍然可以重定向到https。第一次安装证书时,我使用certbot始终重定向到https,可能是它在其他地方设置了此重定向吗?

好的,从我的角度看,这根本不是问题。我的dyndns提供程序的证书出现问题,因此发生此错误