Nginx favicon ico error

Error while setting up ssl, «/usr/share/nginx/html/favicon.ico» failed (2: No such file or directory)

While setting up my ssl using lets encrypt, I keep getting the following error:

My nginx.conf file is:

The site was working perfectly without ssl/HTTPS, but after I installed it keeps showing the default page, How do I resolve it?

PS : UNABLE TO ADD Let’s encrypt as a tag in the bottom, ERROR: Tag list contains an invalid tag «Let’s Encrypt»

Help much Appreciated

Thank you, Madhav

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!

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.

As far as I can see, your Nginx proxy rules are currently present only under the Nginx server block that serves port 80/http. You need to also carry over those rules to the Nginx server block for the port 443/https. Because at the moment you don’t have any proxy rules specified for port 443 so Nginx is not proxying the requests to your backend service.

Basically add the following rules to the server block for port 443:

Then run a config test with:

If you get Syntax OK then restart Nginx.

Let me know how it goes! Best, Bobby


Sign up for Infrastructure as a Newsletter.

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

You get paid; we donate to tech nonprofits.

Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

READ  Leeco le2 4pda прошивки


nginx failed (13: Permission denied) uwsgi (502 bad gateway)

I am having trouble running my application on a new DigitalOcean droplet. The machine runs CentOS 6.5

The error messages printed in the nginx error.log whenever I make a web request to

project folder: drwxr-xr-x 6 webdev www-data 4.0K Nov 19 23:40 ers_portal

socket inside that folder: srw-rw-rw- 1 webdev www-data 0 Nov 19 23:45 ers_portal_uwsgi.sock

If you have any additional info you need just let me know. Thanks!!


I changed the permissions as suggested by @Eugene. Now in my /var/log/nginx/access.log I see

In /var/log/nginx/error.log I see

The favicon.ico rejection (below) that was in var/log/nginx/access.log isn’t showing up anymore

3 Answers 3


I found my typo after many hours of searching. In /path/to/my/webapp/my_app_nginx.conf the line that reads

Also, in /etc/nginx/nginx.conf change user nginx www-data; back to user nginx;

Also ensure that there is not a default server block in the «top-level» /etc/nginx/nginx.conf that conflicts with your app’s configuration (in my case /path/to/my/webapp/my_app_nginx.conf , which is symlinked to the /etc/nginx/conf.d/ folder).

  1. Don’t get discouraged. The worst (maybe second worst) feeling in the world is not being able to figure something out over an extended period of time. Especially if this is your hobby, it can be easy to feel that you’re incompetent and this stuff is too hard and you’re not good enough. Stick at it.
  2. Be methodical. I was getting change-crazy, especially at the end there. This results in going to bed with no real progress and waking up in the same spot you were. Write it all down, document what you have tried and keep track of previous changes. if ABABA is the working config, and —B- was the change you were looking for, but you forgot to change —B— back to —A— , you will repeat and repeat and repeat yourself. See #1
  3. Remember sometimes the most important thing to reaching your solution is to get up and walk away.
  4. Don’t discount the knowledge of your peers (this community). While they may not have the instant answer for your particular problem, remember All of us isn’t as dumb as none of us (or some silly saying like that). We all have a deep-seated love of scrubbing problems from the planet, one at a time.


Arch Linux

You are not logged in.

#1 2017-06-08 01:10:22

nginx and php-fpm [SOLVED] (but still welcome more insight)

So installed nginx and php-fpm but the odd thing is that I have no «sites-enabled» or «sites-available» directories.

READ  Valeo v42 duster прошивка

This is my /etc/nginx/nginx.conf

but when I go to localhost it still is looking for things in the wrong document root and I don’t see where I could have set

when I symlink it there:
sudo ln -s /usr/share/nginx/html /etc/nginx/html
I get this in the logs if I don’t have a favicon, but otherwise I don’t get anything

and this appears:

There seems to be something wrong, do you know what that is, why I don’t have a sites-enabled or a sites-available, and how do I change my document root? Thanks.

Last edited by felixtheratruns (2017-06-08 04:06:18)

#2 2017-06-08 03:39:57

Re: nginx and php-fpm [SOLVED] (but still welcome more insight)

just tried folowing this tutorial: … e-sockets/
but changing it for my file structure.
and I get this when I go to localhost in my browser:

symlinked the file:
ls -l /etc/nginx/sites-enabled/localhost

output of:
journalctl -ex

Last edited by felixtheratruns (2017-06-08 15:06:28)

#3 2017-06-08 03:55:28

Re: nginx and php-fpm [SOLVED] (but still welcome more insight)

TO BE VERY CLEAR: this is for the setup that I had in my reply, NOT the setup in my original post.

well silly me, had to change /etc/nginx/sites-enabled/localhost

and here’s the file I tested it with: (the file and all the directories it is in are owned by root, yeah not sure why that works with the http user that is set, I guess http is just the process the server runs under)

TO BE VERY CLEAR: this is for the setup that I had in my reply, NOT the setup in my original post.

Last edited by felixtheratruns (2017-06-08 04:04:41)


Nginx reverse proxy not loading resources from another port

My nginx root is /usr/share/nginx/html/ and my Node.js App is at /root/app/. But the reverse proxy searches for the app at nginx root.

I used the following location block.

And changed the base uri in the app’s config to

But I get a blank page, but the title bar says «AppName«

Here is the nginx error log

How can I successfully reverse proxy without moving my app from /root/app to the nginx root?


On viewing the source of the page, I can see that nginx is trying to load resources from /static/js and /static/css at when it should be loading them from

So it is basically proxying the port, but not the resources.

How do I pass the resources too?

READ  Pocketbook 515 прошивка как установить

1 Answer 1

You are using /t in location , but rewrites ^/t/(.*) , so nginx doesn’t rewrite request to /t and it is passed to your app as is.

In general, you should always use trailing slash in location directive that should match directory (unless you’re absolutely sure, you don’t need it).

Also there is a shortcut for this common case to replace location prefix in nginx. Try this one:

Documentation on proxy_pass says:

A request URI is passed to the server as follows:

  • If the proxy_pass directive is specified with a URI, then when a request is passed to the server, the part of a normalized request URI matching the location is replaced by a URI specified in the directive.

Nginx will replace /t/ in location directive with / from proxy_pass directive.

Probably you have to change app’s baseURI to /t/ too.


favicon.ico did not show when prod env #5385



Steps to reproduce

on linux server, i clone the project, then run «yarn run build» and «pm2 start npm —name «cygy-www» —watch — run start»,
use nginx reverse proxy reflex on port 3000, visti domain, the favicon did not show

What is expected ?

the favicon.ico show

What is actually happening?

the favicon did not show

Additional comments?

the favicon.ico showed on dev env.

The text was updated successfully, but these errors were encountered:

Hi, i tried to reproduce and lost the any resources except the index, no matter product or development environment.
But i found an error in nginx.conf that proxy_pass https://internal.ip:port; . Missing a / after the port and everything goes wrong. Fix to proxy_pass https://internal.ip:port/; , it’s gonna be all right.
So is any possible with nginx?

Nuxt ^2.4.0
Nginx 1.14.0

i want to know where is favicon.ico after builded, i can’t find it in .nuxt/build/client
and my nginx.conf is>

I got it, here is the document to explain it. it is Nuxt static.

All included files will be automatically served by Nuxt and are accessible through your project root URL. (static/favicon.ico will be available at localhost:3000/favicon.ico)

Follow this, the favicon.ico is still in the directory static.

okay,i had solved the issue.

on nginx.conf, i should add

then ‘’ can be Point nuxtProject/static

© 2023 GitHub, Inc.

You can’t perform that action at this time.

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.