2

I tried a lot by reading different answers on Stackoverflow and other forums but unable to identify the error, can someone please check the below configuration and tell me what could be wrong?

server {
    server_name test.domain.com;
    listen 80;
    location / {
        proxy_pass http://176.X.XX.XXX:30805;
    }
}

server {
    server_name test.domain.com;
    listen 443 ssl;


    access_log /var/log/nginx/ssl_access_test main;
    error_log /var/log/nginx/ssl_error_test info;

    ssl_certificate /root/ssl/wildcard.domain.com.pem;
    ssl_certificate_key /root/ssl/wildcard.domain.com.pem;

    ssl_prefer_server_ciphers on;
    ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
    ssl_ciphers ECDH+AESGCM:DH+AESGCM:ECDH+AES256:DH+AES256:ECDH+AES128:DH+AES:ECDH+3DES:DH+3DES:RSA+AES;

    ssl_session_cache shared:SSL:10m;
    ssl_session_timeout 10m;

    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_redirect http:// https://;
        proxy_pass http://176.X.XX.XXX:30805;
    }
}

I am able to access the page on http://test.example.com but not able to get it on https://test.example.com (instead a connection timeout), I also tried to redirect from port 80 to 443 but it didn't help because I tried a lot of different combinations of configurations

1
  • 1
    Sounds like you haven't opened port 443, Apache and Nginx have no control over the internal firewall. Commented Mar 9, 2018 at 21:58

1 Answer 1

1

Issue resolved after installing firewall-cmd and adding a rule for port 443.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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