Possible to serve a single insecure file (apple-touch-icon) on nginx for a Meteor app?

I have a Meteor app setup following this basic procedure:

The one problem I am currently having is that, on iOS when I open the site in Safari and then choose to “Add to Home Screen”, Safari does not seem to find the “apple-touch-icon” and use this icon for the home screen. This works when the app is deployed to and when run locally on my development machine.

There appear to be two primary differences from those and this deployment:

  1. On Digital Ocean nginx is sitting in front of the Meteor app.
  2. On Digital Ocean things are setup to run over SSL.

At first I thought it might be an issue of using the temporary/fake certificate as suggested in the tutorial above. However this problem persists even after installing a legitimate certificate.

So now my theory is that, for some reason, iOS Safari doesn’t like accessing the apple-touch-icon over HTTPS at all, so I want to try serving that icon over HTTP.

Is it possible to modify the configuration offered in that tutorial do try that?

Show comments

Submit an answer

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!

Sign In or Sign Up to Answer

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Want to learn more? Join the DigitalOcean Community!

Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.

I would first try redirecting http -> https

server { server_name xxx; return 301 https://$host$request_uri; }

If that doesn’t work you can serve the single file as needed:

server {
	server_name xxx;
	location = /apple-touch-icon.png { root /var/www/xxx/; }
	location / { return 444; }