[GH-ISSUE #59] requirements #44

Closed
opened 2026-02-25 23:40:30 +03:00 by kerem · 5 comments
Owner

Originally created by @jersam on GitHub (Jun 22, 2018).
Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/59

A domain or sub-domain since PictShare can't be run from a subfolder of some other domain

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

Originally created by @jersam on GitHub (Jun 22, 2018). Original GitHub issue: https://github.com/HaschekSolutions/pictshare/issues/59 > A domain or sub-domain since PictShare can't be run from a subfolder of some other domain 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
kerem closed this issue 2026-02-25 23:40:30 +03:00
Author
Owner

@birkett commented on GitHub (Jun 22, 2018):

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.

<!-- gh-comment-id:399580249 --> @birkett commented on GitHub (Jun 22, 2018): 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.
Author
Owner

@geek-at commented on GitHub (Jun 22, 2018):

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

<!-- gh-comment-id:399582450 --> @geek-at commented on GitHub (Jun 22, 2018): 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
Author
Owner

@jersam commented on GitHub (Jun 22, 2018):

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

<!-- gh-comment-id:399585470 --> @jersam commented on GitHub (Jun 22, 2018): 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
Author
Owner

@birkett commented on GitHub (Jun 23, 2018):

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;

<!-- gh-comment-id:399683865 --> @birkett commented on GitHub (Jun 23, 2018): 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;`
Author
Owner

@jersam commented on GitHub (Jun 23, 2018):

Yeah. That's what I see too but not sure why.

<!-- gh-comment-id:399685390 --> @jersam commented on GitHub (Jun 23, 2018): Yeah. That's what I see too but not sure why.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/pictshare#44
No description provided.