dummyimage icon indicating copy to clipboard operation
dummyimage copied to clipboard

Can you elaborate the nginx.conf please?

Open debanjanbasu opened this issue 8 years ago • 1 comments

I am trying to configure the nginx server to implement the nginx.conf. Can you please elaborate the steps in the Readme please?

debanjanbasu avatar Feb 13 '17 04:02 debanjanbasu

@debanjanbasu did you find an answer? For me its saying page isn't working

shabbir-dhangot avatar Jul 24 '18 04:07 shabbir-dhangot

nginx.conf does not seem to be working. Any of you find a solution to this ?

Smashr avatar Mar 07 '23 09:03 Smashr

I have just simplified the rewrite rules for dummyimage.com to work. Now named image sizes like hd1080 and skyscraper are handled by the PHP code and not rewrite rules. For nginx to work You should just need to add these two rules somewhere in your site's server conf:

error_page 404 = @404;
location @404 {
   rewrite (.*) /code.php?x=$request_uri last;
}

rewrite (.*) /code.php?x=$request_uri last;

See https://github.com/kingkool68/dummyimage/blob/9ec16b9c728a1a63a10fc6004d96198c6350cd84/nginx.conf

See #38 and the PR #39 for more details.

kingkool68 avatar Aug 15 '23 19:08 kingkool68