Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/drupal/3.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
Drupal、nginx、ssl和php——噩梦_Php_Drupal_Ssl_Nginx - Fatal编程技术网

Drupal、nginx、ssl和php——噩梦

Drupal、nginx、ssl和php——噩梦,php,drupal,ssl,nginx,Php,Drupal,Ssl,Nginx,我想我也会跨过邮局到stackoverflow;这是我的问题: 我已经在我的服务器上安装了一个ssl证书,读了很多书,做了所有不同的建议,但是我似乎无法显示$u server['HTTPS']变量。有人请帮忙。这是我的配置: 服务器: 利诺德 Ubuntu 8.02LTS nginx-最新版本 创建vhost: server { listen 443; server_name www.buzzonstage.com;

我想我也会跨过邮局到stackoverflow;这是我的问题: 我已经在我的服务器上安装了一个ssl证书,读了很多书,做了所有不同的建议,但是我似乎无法显示$u server['HTTPS']变量。有人请帮忙。这是我的配置:

服务器: 利诺德 Ubuntu 8.02LTS nginx-最新版本 创建vhost:

server {
            listen   443;
            server_name  www.buzzonstage.com;
            rewrite ^/(.*) https://buzzonstage.com/$1 permanent;
       }

server {
            listen   443;
            server_name buzzonstage.com;
            ssl on;
            ssl_certificate /usr/local/nginx/conf/buzzonstage.com.pem;
            ssl_certificate_key /usr/local/nginx/conf/buzzonstage.com.key;
            access_log /home/maksimize/public_html/buzzonstage.com/log/access.log;
            error_log /home/maksimize/public_html/buzzonstage.com/log/error.log;
            location /  {
                        root   /home/maksimize/public_html/buzzonstage.com/public/;
                        index  index.php index.html;
                        if (!-e $request_filename)
                        {
                        rewrite ^/(.*)$ /index.php?q=$1 last;
                        }
                        }
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            location ~ \.php$
                    {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include /usr/local/nginx/conf/fastcgi_params;
            fastcgi_param SCRIPT_FILENAME /home/maksimize/public_html/buzzonstage.com/public/$fastcgi_script_name;
            fastcgi_param HTTPS on;
            }
       }

server {
            listen   80;
            server_name  www.buzzonstage.com;
            rewrite ^/(.*) http://buzzonstage.com/$1 permanent;
       }
server {
            listen   80;
            server_name buzzonstage.com;
            access_log /home/maksimize/public_html/buzzonstage.com/log/access.log;
            error_log /home/maksimize/public_html/buzzonstage.com/log/error.log;
            location /  {
                        root   /home/maksimize/public_html/buzzonstage.com/public/;
                        index  index.php index.html;
                        if (!-e $request_filename)
                        {
                        rewrite ^/(.*)$ /index.php?q=$1 last;
                        }
                        }
            # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
            location ~ \.php$
                    {
            fastcgi_pass 127.0.0.1:9000;
            fastcgi_index index.php;
            include /usr/local/nginx/conf/fastcgi_params;
            fastcgi_param SCRIPT_FILENAME /home/maksimize/public_html/buzzonstage.com/public/$fastcgi_script_name;
来自digicert的验证结果是准确的,但我收到一条消息,说一些信息可能不安全-我理解这种情况是因为网站上有各种指向不安全页面的链接。phpinfo显示为绿色https

但是为了让某个drupal模块——securepages——工作,我需要能够在$\u服务器阵列中显示该变量。有人能帮忙吗

谢谢

The phpinfo shows up green https; 这很好。因为phpinfo与$\u服务器['HTTPS']变量一起工作。当然,它是有定义的

but I get a message saying that some info may not be secure 嗯,这个模块可能在没有https的情况下工作吗?例如通过AJAX? 在他们得到答案的地方,HTTPS并没有定义。
尝试通过在上添加fastcgi_param HTTPS来检查这一点;到配置的非https部分。我想一切都会开始起作用。但很明显,Twitter模块破坏SSL是一种欺骗…

。修改它,使其仅通过SSL,需要重写小部件,使其在本地加载。是的,这是可能的,并且一切都应该工作

我确实使用ajax在站点上加载内容。很抱歉,我忘了提及该网站目前已被锁定。我作弊了,但还是没有运气。我真的只需要它显示在几个页面上-即结帐和结帐审查页面。站点的其余部分根本不需要https。你认为还有什么可以用的吗? But in order for a certain drupal module to work - securepages I need to be able to show a that variable in the $_SERVER array.