Amazon web services 迁移到AWS-Https重定向问题(Drupal)

Amazon web services 迁移到AWS-Https重定向问题(Drupal),amazon-web-services,amazon-ec2,drupal,Amazon Web Services,Amazon Ec2,Drupal,我已经在AWS上设置了SSL认证 然而,这似乎是自动重定向到https,而不是点击我们的vhosts文件 页面出现以下错误 mixed Content: The page at 'https://preprod-example.co.uk/' was loaded over HTTPS, but requested an insecure stylesheet 'http://preprod-example.co.uk/modules/system/system.base.css?ow428z'

我已经在AWS上设置了SSL认证

然而,这似乎是自动重定向到https,而不是点击我们的vhosts文件

页面出现以下错误

mixed Content: The page at 'https://preprod-example.co.uk/' was loaded over HTTPS, but requested an insecure stylesheet 'http://preprod-example.co.uk/modules/system/system.base.css?ow428z'. This request has been blocked; the content must be served over HTTPS.
vhosts文件:

<VirtualHost *:80>

    DocumentRoot "/var/www/html/example/production"
    ServerName preprod-example.co.uk

    <Directory /var/www/html/example/production>
           order allow,deny
           allow from all
            AllowOverride all
    </Directory>

</VirtualHost>

<VirtualHost *:443>

    DocumentRoot "/var/www/html/example/production"
    ServerName preprod-example.co.uk

    <Directory /var/www/html/example/production>
           order allow,deny
           allow from all
            AllowOverride all
    </Directory>

</VirtualHost>
我哪里出了问题,或者这可能是AWS的问题

SetEnvIf X-Forwarded-Proto^https$https=on

您可以在443虚拟主机之前使用setenif

<VirtualHost *:80>    
DocumentRoot "/var/www/html/example/production"
    ServerName preprod-example.co.uk

    <Directory /var/www/html/example/production>
           order allow,deny
           allow from all
            AllowOverride all
    </Directory>

</VirtualHost>

    SetEnvIf X-Forwarded-Proto "^https$" HTTPS=on
<VirtualHost *:443>

    DocumentRoot "/var/www/html/example/production"
    ServerName preprod-example.co.uk

    <Directory /var/www/html/example/production>
           order allow,deny
           allow from all
            AllowOverride all
    </Directory>

</VirtualHost>

不幸的是,验证码现在已经不起作用了。。。k/image_验证码?sid=122345&;ts=121211212500内部服务器错误检查您的服务器日志,让我知道真正的问题我认为错误日志有一些答案