Назад | Перейти на главную страницу

Можно ли сочетать SNI и выделенный IP-протокол SSL на Apache?

Я достиг предела доступных IP-адресов на моем веб-сервере Apache, но все чаще требуется, чтобы сайты работали с SSL. Мне было бы комфортно с некоторыми сайтами, работающими под SNI, но некоторым из них нужна обратная совместимость, предлагаемая только с SSL на выделенном IP.

Итак, можно ли смешивать их на одном сервере?

Да; для данной комбинации IP-адреса / порта слушателя, сертификата и SNI, а также логики виртуального хоста на основе имени отличаются от других слушателей

Итак, скажи, что хочешь 192.0.2.50 быть SNI, с 192.0.2.51 и 192.0.2.52 как выделенные IP-адреса:

NameVirtualHost 192.0.2.50:443
<VirtualHost 192.0.2.50:443>
  ServerName snisiteone.example.com
  # SSL directives here for this site's certificate to be served via SNI
  # Note that this cert, the first configured, will be used as default
  # for clients that don't support SNI
</VirualHost>
<VirtualHost 192.0.2.50:443>
  ServerName snisitetwo.example.com
  # SSL directives here for this site's certificate to be served via SNI - different cert!
</VirualHost>

<VirtualHost 192.0.2.51:443>
  ServerName dedicatedsite.example.com
  # SSL directives here for this site's certificate
  # Dedicated IP, so this'll be the only cert on this listener, SNI not used
</VirualHost>

<VirtualHost 192.0.2.52:443>
  ServerName dedicatedsitetwo.example.com
  # SSL directives here for this site's certificate
  # Dedicated IP, so this'll be the only cert on this listener, SNI not used
</VirualHost>