Closed jersam closed 6 years ago
That's correct - sub domains (photos.example.com) are supported. Directories are not (example.com/photos).
@chrisiaut Improving the class resolution and routing is already on my list, and will go a long way towards supporting hosting out of a directory. The namespace autoloading in #60 is the first step.
confirmed that subdomain is the only way for the routing scripts to find what to do.. maaaaaybee with the use of the upload_location setting it might work but I doubt it
thanks for the confirmation.
2018/06/22 21:16:40 [error] 9278#9278: *16 open() "/home/nginx/domains/a.domain.com/public/300/zuljj9whl7.jpg" failed (2: No such file or directory), client: 172.250.xx.xx, server: a.domain.com, request: "GET /300/zuljj9whl7.jpg HTTP/1.1", host: "a.domain.com", referrer: "https://a.domain.com/"
location / {
# block common exploits, sql injections etc
#include /usr/local/nginx/conf/block.conf;
# Enables directory listings when index file not found
#autoindex on;
# Shows file listing times as local time
#autoindex_localtime on;
# Enable for vBulletin usage WITHOUT vbSEO installed
# More example Nginx vhost configurations at
# http://centminmod.com/nginx_configure.html
#try_files $uri $uri/ /index.php;
try_files $uri $uri/ /index.php?url=$request_uri;
}
location ~ /(upload|tmp|bin) {
deny all;
return 404;
}
[root@vultr1 ~]# ll /home/nginx/domains/a.domain.com/public/upload/
total 84
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:50 38fdm3xgai.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:46 88efdtiv1w.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:44 d42kk3lma5.jpg
drwxrwsrwx 2 nginx nginx 4096 Jun 22 21:16 deletecodes
-rw-r--r-- 1 nginx nginx 1008 Jun 22 21:16 hashes.csv
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:20 ilsvvry4dk.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:50 ipyt0qq57g.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:45 k89bnfr817.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:20 l5y3475ryv.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:36 nsihhsctjc.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:45 ocs2e7r4ut.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:24 qwsbdqp50q.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:50 rdpb0es9w2.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:22 sdqe6pzfl1.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 18:46 tbz7f3vdyv.jpg
-rw-r--r-- 1 nginx nginx 126 Jun 22 18:36 uploads.txt
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:20 x0371de4ja.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:19 xxz085kl7i.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:19 yxkzyrxmyn.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 20:20 zqnw8m8zq2.jpg
drwxr-sr-x 2 nginx nginx 4096 Jun 22 21:16 zuljj9whl7.jpg
kinda puzzled on my issue.
PHP 7.1.18
Looks like your rewrite rules are not working, so nginx is attempting to serve the images directly.
Check your nginx configuration, specifically:
try_files $uri $uri/ /index.php?url=$request_uri;
Yeah. That's what I see too but not sure why.
can you confirm, photos.domains or photos.com works but not domains.com/photos?
I guess it doesnt matter, I am getting 404s on the images while even using a.domain.com i have the nginx code in the / location.
checking again =D