Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Path error with Nginx

Hi all, My site works fine on apache server. But on Nginx server encountered a little trouble

visit at: http://ototuanphat.fdola.com/public/plugins/elFinder/elfinder.html Screenhot http://i1092.photobucket.com/albums/i414/thanhansoft/Untitled-1%5zpsjzxwoxt4.png

this is my config .conf on Nginx

location / {
    rewrite ^/(.*)$ /public/index.php?_url=/$1;
  }
  location @rewrite {
    rewrite ^/(.*)$ /public/index.php?_url=/$1;
  }

I need access to files elFinder.html, please help me

edited Aug '16

When I open link you provided, it works.

Additionally, for nginx conf it's better to use:

location / {
try_files $uri $uri/ /index.php$is_args$query_string;
}

DO NOT show public dir to the general public, but only www.yourdomain.com/index.php



6.6k
Accepted
answer
edited Aug '16

Hi, thank you support. I've tried your way, but without success. I've used this way, and success

```php

location / { rewrite ^/(.)$ /public/index.php?_url=/$1; } location @rewrite { rewrite ^/(.)$ /public/index.php?url=/$1; } location /public/plugins/elFinder/elfinder.html { tryfiles $uri $uri/ /public/plugins/elFinder/elfinder.html$isargs$querystring; }

```

Thank for so much