express - ExpressJS + serve-favicon + nginx -
i'm having problems serving favicons nginx reverse proxy in front end of express app.
tried search answers couldn't find any. configuration file shown:
server { hear 80; server_name vogueverve.com; location / { proxy_pass http://localhost:3000; proxy_http_version 1.1; proxy_set_header upgrade $http_upgrade; proxy_set_header connection 'upgrade'; proxy_set_header host $host; proxy_cache_bypass $http_upgrade; } location ~* ^.+\.(jpg|jpeg|gif|png|ico|css|zip|tgz|gz|rar|bz2|pdf|txt|tar|w$ root /var/www/hashiontag/public; } } please help! give thanks much!
i found reply here:
http://serverfault.com/questions/308299/how-to-set-a-favicon-ico-for-a-specific-virtual-host-on-nginx#answer-308304
apparently, nginx, default set favicon @ root directory, because nginx directs clients favicon www.domainname.com/favicon.ico default.
this means that, (i think) nginx reverse proxy, favicon request never reaches express layer, , hence can't serve it.
express nginx
No comments:
Post a Comment