Created
October 24, 2024 11:15
-
-
Save ZiTAL/94f9ee6c64f322324819c58132ee9350 to your computer and use it in GitHub Desktop.
ERR_SSL_PROTOCOL_ERROR: fix nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| server { | |
| include /etc/nginx/vhost.conf.d/http.conf; | |
| server_name example.domain.eus | |
| root /var/www/html | |
| location /search { | |
| proxy_pass http://example.domain.eus:8080/search; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| } | |
| error_log /var/log/nginx/example-error.log error; | |
| access_log /var/log/nginx/example-access.log; | |
| } | |
| server { | |
| include /etc/nginx/vhost.conf.d/http.conf; | |
| server_name example.domain.eus | |
| root /var/www/html | |
| location /search { | |
| proxy_pass http://example.domain.eus:8080/search; | |
| proxy_set_header Host $host; | |
| proxy_set_header X-Real-IP $remote_addr; | |
| proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; | |
| } | |
| error_log /var/log/nginx/example-error.log error; | |
| access_log /var/log/nginx/example-access.log; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| listen 80; | |
| if ($server_port = 80) { | |
| return 302 https://$server_name$request_uri; | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| listen 443 ssl; | |
| ssl_certificate /etc/letsencrypt/live/example.com-0002/fullchain.pem; | |
| ssl_certificate_key /etc/letsencrypt/live/example.com-0002/privkey.pem; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment