ngnix的SSLconfiguration工作得很好,而不是https

我正在运行nginx(nginx / 1.10.0)作为我的web服务器后面的AWS ELB与Drupal 7和使用php7.1问题是http://工作正常,但与https:// url相同的网站只服务页面的https组件而不是像https等非https组件

AWS ELB端发生ssl终止

这是我的nginxconfiguration

server { listen 80 default_server; listen [::]:80 default_server; listen 443 ssl http2 default_server; listen [::]:443 ssl http2 default_server; server_name site_url; root /var/www/html/smb; index index.php index.html index.htm ; error_page 404 = @smb; location @smb { rewrite ^(.*)$ /index.php?q=$1 last; } location ~ \.php$ { include snippets/fastcgi-php.conf; fastcgi_pass unix:/run/php/php7.1-fpm.sock; } location ~ /\.ht { deny all; } } 

如果在AWS ELB端发生ssl终止,为什么仍然使用端口443? 这是不需要的,你可以只使用端口80来处理所有请求,因为你不需要任何SSL。

正如@HBruijn所说,你的应用程序有问题,而不是nginx。 看起来像硬编码的URL与http://为CSS等您应该检查您的代码并修复它。