Kod: Zaznacz cały
NameVirtualHost 192.168.0.100:8080
NameVirtualHost 123.123.123.123:8080
Listen 8080
Kod: Zaznacz cały
<VirtualHost 123.123.123.123:8080> ServerAdmin webmaster@localhost
ServerName 123.123.123.123:8080
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/ocGlobal.crt
SSLCertificateKeyFile /etc/apache2/ssl/ocGlobal.key
</VirtualHost>
<VirtualHost 192.168.0.100:8080> ServerAdmin webmaster@localhost
ServerName 192.168.0.100:8080
SSLEngine On
SSLCertificateFile /etc/apache2/ssl/ocLocal.crt
SSLCertificateKeyFile /etc/apache2/ssl/ocLocal.key
</VirtualHost>
Całość działa po HTTPS (z ssl, mimo portu 8080). Teoretycznie wszystko jest tak jak powinno być (a przynajmniej tak mi się wydaje), tylko problem jest taki, że globalnie zostaje użyty certyfikat lokalny. Sprawdziłem to też inaczej: otworzyłem adres: http://123.123.123.123:8080/ i otrzymałem komunikat:
Kod: Zaznacz cały
Bad RequestYour browser sent a request that this server could not understand.
Reason: You're speaking plain HTTP to an SSL-enabled server port.
Instead use the HTTPS scheme to access this URL, please.
[INDENT]Hint: https://192.168.0.100:8080/[/INDENT]
Dodam może jeszcze że próba dostępu do serwera po ip 123.123.123.123 z sieci lokalnej kończy się niepowodzeniem (ERR_CONNECTION_REFUSED).