0

I have an ubuntu server with Apache 2.4.7 and images are not retrieved by mobile clients, on desktop it works. Apache blocks images based on User Agent header with error 403 Forbidden.

Mod rewrite is enabled. The .htacces file I have is a simple one:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

My vhost conf file

<VirtualHost *:80>
    ServerAdmin office@eventbook.ro
    DocumentRoot /var/www/eventbook.ro/public

    ServerName eventbook.ro

    <Directory "/var/www/eventbook.ro/public">
            Options Indexes FollowSymLinks MultiViews
            AllowOverride All
            Order allow,deny
            allow from all
    </Directory>

    ErrorLog ${APACHE_LOG_DIR}/error.log
    CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

How can I enable images for mobile devices on apache?

You can checkit out here: eventbook.ro

UPDATE: error log from apache gave me a clue

[core:crit] [pid 13899] (13)Permission denied: [client 188.25.90.176:51594] AH00529: /var/www/eventbook.ro/public/images/event/.htaccess pcfg_openfile: unable to check htaccess file, ensure it is readable and that '/var/www/eventbook.ro/public/images/event/' is executable, referer: http://eventbook.ro/

So changing permissions to 777 for images subdirectory solved the problem... but it is ok to have 777 for a public folder?

0 Answers0