Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

1 Answer 1

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? –  Guy 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
add comment

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.