how to fix 404 not found nginx export pdf with dompdf

Posted May 20, 2020 2k views

As i use laravel and dompdf for my website, it works on local development

but when i push it on my server, it always return this error when clicking export.

when i checked my laravel.log it doesnt show what the error is

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.

Submit an Answer
1 answer

Hi @erandadava,

I’ll recommend checking your Nginx error log, this seems to be an issue with Nginx rather than Laravel. Additionally, see if you haven’t missed something in your Nginx configuration file. If you are unsure what needs to be added in it or how it should look, I’ll recommend checking out the following article about it:

If you are still unsure please do post what you see in the Nginx error log and how your configuration file does look like.


by Justin Ellingwood
When using the Nginx web server, server blocks (similar to the virtual hosts in Apache) can be used to encapsulate configuration details and host more than one domain off of a single server. In this guide, we'll discuss how to configure server blocks in Nginx on an Ubuntu 16.04 server.
  • Hello thank you for your response,

    i got to find this error in error.log today thanks to your responses. but i dont know what to do since in local it works perfectly

    this one is the url for exporting with dompdf

    2020/05/21 06:32:41 [error] 103874#103874: *16601878 open() "/var/www/html/fifgroup/public/download-artikel/spektra/3-rekomendasi-laptop-murah-terbaik-untuk-wfh" failed (2: No such file or directory), client:, server: www$

    2020/05/21 06:32:45 [error] 103874#103874: *16601903 open() “/var/www/html/fifgroup/public/fonts/Mark Simonson - Proxima Nova Alt Regular-webfont.woff2” failed (2: No such file or directory), client:, server: www.fifgroup.c