By johnareid
So I got the website up and running, got HTTPS working and configured Nginx to redirect http calls over to HTTPS
sudo nano /etc/nginx/sites-enabled/default
# HTTP - redirect all requests to HTTPS:
server {
listen 80;
listen [::]:80 default_server ipv6only=on;
return 301 https://$host$request_uri;
}
All seems to be working great! So goes out and have a coffee at a fast food restaurant in the city. They have wifi available so decide to check out the new website. Problem is it comes back with an error - “cannot establish an secure connection” - I am assuming their free wifi is configured not to allow HTTPS calls.
I hate to think the website may be unavailable (think of all the new users I am going to lose!). I could disable the nginx redirect to https - but my problem is the app uses needs access to the microphone and without HTTPS you get horrible request boxes.
So my question is there anyway to configure the HTTPS redirect so that if it fails to will go to normal http?
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.