Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

http:// works well, however, if I am trying to access https:// host, I get an error saying "The connection to the server was reset while the page was loading." (Firefox 8). Furthermore, simply adding listen 443 ssl default; messes up the other SSL vir

server
{
    listen 443 ssl default;

    server_name _;

    server_name_in_redirect off;

    #rewrite    ^ http://$server_name$request_uri? permanent;
    rewrite ^ http://$host$request_uri? permanent;
}

server
{
    listen 80 default;

    server_name _;

    server_name_in_redirect off;

    root "/var/www/virtualhosts/dev.anuary.com/default";

    include /etc/nginx/anuary_location_php;
}
share|improve this question

You're going to need, at the very least, ssl_certificate and ssl_certificate_key for the server to be able to complete connections on that port.

This is why you're seeing the connection be reset by nginx - it's got no key to do its SSL negotiation with.

share|improve this answer
    
Hm. So there is no way to force non-ssl connection for people who are trying to use my server from unknown hosts? – Gajus Dec 8 '11 at 22:11
    
@Guy You certainly can, but you still need a certificate for listening on that port. Connecting clients are likely to get a warning about a hostname mismatch, but such is life. – Shane Madden Dec 8 '11 at 22:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.