I am using
- Apache
- Ruby and Ruby on Rails 3
- Mac Os running “Snow Leopard”
and I would like to use HTTPS on localhost for my domains and sub-domains.
I have already set everything (I think correctly):
- I generated a wildcard certificate for my domains and sub-domains (example: *.sitename.com)
- I have set base-named virtualhosts in the
http.conffile listening on port:433and:80 - My browser accept certificates also if it alerts me that those aren’t safe and I can have access to pages using HTTPS
From the official Apache guide I read that it is not possible to do that using name-based virtualhost, but I also read someone that made that in some way (what?! I don’t understand…).
So, is it possible or not to use HTTPS in localhost for multiple domains and sub-domains? If so, what I must “to do”\”to check” for working with that?
UPDATE for @sarnold
typhoeus appears to use libcurl, and
libcurl appears to support SNI — is
your version of libcurl new enough to
support SNI? Does typhoeous know how
to enable it? (Do clients of libcurl
need to “enable” it SNI themselves?)
I think so because I can access all sub_domains over HTTPS and libcurl should be updated:
curl -V--version
curl 7.21.2 (x86_64-apple-darwin10.5.0) libcurl/7.21.2 OpenSSL/1.0.0c zlib/1.2.5 libidn/1.19
Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp smtp smtps telnet tftp
Features: IDN IPv6 Largefile NTLM SSL libz
# Typhoeus request
Typhoeus::Request.get("https://<sub_domain_name>.<domain_name>.com/")
How can I check if “Do clients of libcurl need to “enable” it SNI themselves?“?
The techniques for doing name-based virtual servers with SSL/TLS aren’t great choices, but the Server Name Indication extension allows browsers to request a specific site by name, allowing different certificates to be used with different sites. Not all browsers support SNI yet.
Though one might ask what value there is is in having multiple certificates if they are all served out of the same process with the same privileges, anything to improve the user’s TLS experience has to be worth the hassle. 🙂