• Welcome to the Chevereto user community!

    Here users from all over the world gather around to learn the latest about Chevereto and contribute with ideas to improve the software.

    Please keep in mind:

    • 😌 This community is user driven. Be polite with other users.
    • 👉 Is required to purchase a Chevereto license to participate in this community (doesn't apply to Pre-sales).
    • 💸 Purchase a Pro Subscription to get access to active software support and faster ticket response times.

Image viewer pages -> That page doesn't exist

Status
Not open for further replies.

badmanct

Chevereto Member
Hello all,
I have re-setup my vps. After setup, all image viewer pages can't access :'( I don't know why :'(
My VPS
OS Centos OS 6.5 using lastest Virtualmin
Here is my .htaccess file
Code:
# Disable server signature
ServerSignature Off

# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
#Options +FollowSymLinks

<IfModule mod_rewrite.c>

    RewriteEngine On
  
    # If you have problems with the rewrite rules remove the "#" from the following RewriteBase line
    # You will also have to change the path to reflect the path to your Chevereto installation
    # If you are using alias is most likely that you will need this.
    #RewriteBase /

    # 404 images
    # If you want to have your own fancy "image not found" image remove the "#" from RewriteCond and RewriteRule lines
    # Make sure to apply the correct paths to reflect your current installation
    RewriteCond %{REQUEST_FILENAME} !-f
    #RewriteRule images/.+\.(gif|jpe?g|png|bmp) - [NC,L,R=404]
    #RewriteRule images/.+\.(gif|jpe?g|png|bmp) content/images/system/404.gif [NC,L]
      
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} !\.(css|js|html|htm|rtf|rtx|svg|svgz|txt|xsd|xsl|xml|asf|asx|wax|wmv|wmx|avi|bmp|class|divx|doc|docx|exe|gif|gz|gzip|ico|jpe?g|jpe|mdb|mid|midi|mov|qt|mp3|m4a|mp4|m4v|mpeg|mpg|mpe|mpp|odb|odc|odf|odg|odp|ods|odt|ogg|pdf|png|pot|pps|ppt|pptx|ra|ram|swf|tar|tif|tiff|wav|wma|wri|xla|xls|xlsx|xlt|xlw|zip)$ [NC]
    RewriteRule . index.php [L]

</IfModule>

Other pages (etc dashboard,setting,signin,.. ) is accessible
My url
Code:
https://anh.im
Sorry for my english :'(
 
Nginx?

Code:
location / {
    try_files $uri $uri/ /index.php?$query_string;
}
 
No, I'm using Apache on main site, external storage just install nginx as webserver and ftp-server (no php, no mysql, just access via FTP and direct link)
Just comment /app/routes/route.image.php everything is back normal
Code:
/*$url = preg_replace('/^https:/i', 'http:', $image['file_resource']['chain']['image']);
            $url = $image['file_resource']['chain']['image'];
            $headers = G\getUrlHeaders($url, [CURLOPT_REFERER => G\get_current_url()]); // Add referrer for some CDN restrictions
            $error_tpl = "Can't fetch file header from external storage server: %url (%e)";
            if($headers['http_code'] == 500) { // Internal (curl) error
                $error_e = $headers['error'];
            } else if($headers['http_code'] !== 200) {
                $error_e = $headers['http_code'];
            }
            if($error_e) {
                error_log(strtr($error_tpl, ['%url' => $url, '%e' => $error_e]));
                if($headers['http_code'] !== 200) {
                    return $handler->issue404();
                }
            }

Issued after I setup alway ssl on my external storages
Access via direct link is ok, but when i read error_log
Can't fetch file header from external storage server
 
That's the way system pings the external server to see if the image is there. Maybe your server is banned or something.

What kind of external server are you using?
 
At External storage, I'm using Centos 6 with nginx and vsftpd, no PHP setup because i'm using external storage for images only. and I'm setup Letsencrypt and Cloudflare Crypto is Full SSL.
Access via direct link is ok.
Sorry for my english not well
 
You should use SFTP, is far supperior protocol. Most likely the server is trimming that IP due to hits or something like that. You should use SFTP, it has more bulk options and it works faster.
 
SFTP is a way superior protocol, it handles better and it suits better for this kind of hosting. Anyway, you should check the log on your external storage to see why that request got blocked. Maybe you need to whitelist your server IP, maybe the CDN needs whitelist, etc.

Thing is that without that check the system will work but it won't ping external images to see if them are there or not.
 
Code:
error.log:2016/05/08 15:39:40 [error] 4594#0: *5250 open() "/home/xxxx/2016/05/08/P138055426471.th.jpg)](https:/anh.im/image/SE5" failed (2: No such file or directory), client: 108.xxx.246.228, server: s1.anh.im, request: "GET /2016/05/08/P138055426471.th.jpg)](https://anh.im/image/SE5 HTTP/1.1", host: "s1.anh.im"
error.log:2016/05/08 15:39:49 [error] 4594#0: *5252 open() "/home/xxxx/2016/05/08/P138058864727.th.jpg)](https:/anh.im/image/SEN" failed (2: No such file or directory), client: 108.xxx.245.225, server: s1.anh.im, request: "GET /2016/05/08/P138058864727.th.jpg)](https://anh.im/image/SEN HTTP/1.1", host: "s1.anh.im"
error.log:2016/05/08 15:40:00 [error] 4594#0: *5253 open() "/home/xxxx/2016/05/08/P1380558d15bb.th.jpg)](https:/anh.im/image/SER" failed (2: No such file or directory), client: 162.xxx.104.149, server: s1.anh.im, request: "GET /2016/05/08/P1380558d15bb.th.jpg)](https://anh.im/image/SER HTTP/1.1", host: "s1.anh.im"
error.log:2016/05/08 15:40:12 [error] 4594#0: *5265 open() "/home/xxxx/2016/05/08/P1380584a88a5.th.jpg)](https:/anh.im/image/SEB" failed (2: No such file or directory), client: 108.xxx.246.225, server: s1.anh.im, request: "GET /2016/05/08/P1380584a88a5.th.jpg)](https://anh.im/image/SEB HTTP/1.1", host: "s1.anh.im"
error.log:2016/05/08 15:40:34 [error] 4594#0: *5267 open() "/home/xxxx/2016/05/08/P13805485b903.th.jpg)](https:/anh.im/image/SEe" failed (2: No such file or directory), client: 162.xxx.104.107, server: s1.anh.im, request: "GET /2016/05/08/P13805485b903.th.jpg)](https://anh.im/image/SEe HTTP/1.1", host: "s1.anh.im"
error.log:2016/05/08 15:41:31 [error] 4594#0: *5271 open() "/home/xxxx/2016/05/08/P1380564c058b.th.jpg)](https:/anh.im/image/SEY" failed (2: No such file or directory), client: 162.xxx.104.95, server: s1.anh.im, request: "GET /2016/05/08/P1380564c058b.th.jpg)](https://anh.im/image/SEY HTTP/1.1", host: "s1.anh.im"
This is error log. I don't understand :'(
 
Last edited:
Send me access and I will check it on Monday. I will need admin access to your Chevereto installation and SFTP/FTP access to the server where you are running Chevereto.

Send those to inbox@chevereto.com
 
Prolems on ping and curl fixed when I add private ip for s1 and s2 into /etc/hosts
But my problems didn't resolved :-(
 
Sorry to hear that, but Chevereto doesn't control what happens in your server when it tries to pong server B to see if the images are there or not.
 
Status
Not open for further replies.
Back
Top