http - How to turn off ssl for specific url? -
here config:
upstream example { server unix:///home/deploy/apps/example/shared/tmp/sockets/example-puma.sock; } server { listen 80 default_server; server_name example.org; location /non_https { proxy_pass http://example; } return 301 https://$server_name$request_uri; } server { listen 443 ssl default_server; ssl_certificate /etc/letsencrypt/live/example.org/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/example.org/privkey.pem; include snippets/ssl-params.conf; root /home/deploy/apps/example/current/public; try_files $uri/index.html $uri @example; location @example { proxy_set_header x-forwarded-for $proxy_add_x_forwarded_for; proxy_set_header host $http_host; proxy_redirect off; proxy_pass http://example; } keepalive_timeout 10; }
i need turn off ssl /non_https/* how it?
if place retuen 301 inside location "/" block should work:
server { listen 80 default_server; server_name example.org; location /non_https { proxy_pass http://example; } location / { return 301 https://$server_name$request_uri; } }
Comments
Post a Comment