Yes, indeed, a 'static' file handler is needed but failing to implement one.

The setup briefly is as follows: Debian10 on a Linode, running Perl 5.28 and Mojolicious 9.17

The simple_app was setup automatically with 'mojo' and in the simple_image.yml, one directive was added:
hypnotoad: proxy: - 1

The tree.png appears in the Welcome page (with the favicon.ico), when runs directly under 'daemon' server. The hypnotoad server was set-up as a systemd service with the most recent Nginx configuration as:

upstream backendurl { server 127.0.0.1:8080 fail_timeout=0; } server { listen 80; listen [::]:80; server_name example.com www.example.com; access_log /var/log/nginx/access.log; error_log /var/log/nginx/error.log info; root /var/www/simple_image/public; location / { try_files $uri @proxy; access_log off; expires max; add_header 'Access-Control-Allow-Origin' 'http://example.com'; } location @proxy { proxy_set_header Host $http_host; proxy_set_header X-Forwarded-Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://backendurl; } }
The default simple_image app runs properly but without rendering the tree.png image nor the favicon. When this url is enter: http://example.com/tree.png - the image alone appears together with the favicon.

In reply to Re^2: Mojolicious-Hypnotoad-Nginx - rendering images by pdkakoba
in thread Mojolicious-Hypnotoad-Nginx - rendering images by pdkakoba

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.