in reply to Re: Mojolicious-Hypnotoad-Nginx - rendering images
in thread Mojolicious-Hypnotoad-Nginx - rendering images
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:
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.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; } }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Mojolicious-Hypnotoad-Nginx - rendering images
by pdkakoba (Novice) on Apr 19, 2021 at 10:30 UTC |