I just wrapped up upgrading my OS from Ubuntu 12.04LTS to Ubuntu 14.04LTS and suddenly it seems as if Chevereto and mod_rewrite are not cooperating. This webserver simply runs apache2 with Cloudflare, with no other local proxy services in the middle of the configuration, and the issue still persists even if I access the webserver's IP directly without Cloudflare in the middle.
Specifically what is broken is the short URLs and image uploading either via the web or the API. I am able to browse to the long-form URL so I don't believe its a permissions issue as I ran "chown www-data:www-data /var/www/ -R" just to be sure (/var/www/ is where is my DocumentRoot).
mod_rewrite is definitely enabled:
root@img:/var/www# apachectl -M | grep rewrite
rewrite_module (shared)
In /var/www/.htaccess everything looks the same as it did prior to the OS upgrade:
# Disable server signature
ServerSignature Off
# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks
# Turn on mod_rewrite
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
RewriteBase /
# The /api rewrite
RewriteRule ^api$ api.php [L]
# 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) content/system/img/404.gif [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.([a-z]{1,4})$ [NC]
RewriteRule . index.php [L]
Same thing with /var/www/images/.htaccess:
<Files .*>
order allow,deny
deny from all
</Files>
AddHandler cgi-script .php .php3 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgi .fcgi
Options -ExecCGI
/etc/apache2/sites-enabled/img.MyDomain.com.conf looks normal too: (redacted IP and Domain from below for personal privacy)
<VirtualHost ***.***.***.***:80>
ServerAdmin *********@********.com
ServerName img.********.com
DocumentRoot /var/www
ErrorLog /var/www/logs/error.log
</VirtualHost>
The only thing I changed besides the OS upgrade was /etc/apache2/sites-available/mydomain.com to /etc/apache2/sites-available/mydomain.com.conf as the newer apache2 wants the .conf at the end of the site's configuration file in order to enable to site as such: a2ensite mydomain.com.conf
Please kindly advise if there is anything I can do to get my image host back online as I am completely at a loss for answers and the closest thing I could find was a wjunction post where the only responses were one from some bonehead who said Chevereto is a terrible image hosting script and another from someone who said to PM him on Skype (probably to charge him for support)... :\
Specifically what is broken is the short URLs and image uploading either via the web or the API. I am able to browse to the long-form URL so I don't believe its a permissions issue as I ran "chown www-data:www-data /var/www/ -R" just to be sure (/var/www/ is where is my DocumentRoot).
mod_rewrite is definitely enabled:
root@img:/var/www# apachectl -M | grep rewrite
rewrite_module (shared)
In /var/www/.htaccess everything looks the same as it did prior to the OS upgrade:
# Disable server signature
ServerSignature Off
# Disable directory listing (-indexes), Multiviews (-MultiViews) and enable Follow system links (+FollowSymLinks)
Options -Indexes
Options -MultiViews
Options +FollowSymLinks
# Turn on mod_rewrite
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
RewriteBase /
# The /api rewrite
RewriteRule ^api$ api.php [L]
# 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) content/system/img/404.gif [NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !\.([a-z]{1,4})$ [NC]
RewriteRule . index.php [L]
Same thing with /var/www/images/.htaccess:
<Files .*>
order allow,deny
deny from all
</Files>
AddHandler cgi-script .php .php3 .phtml .pl .py .jsp .asp .htm .shtml .sh .cgi .fcgi
Options -ExecCGI
/etc/apache2/sites-enabled/img.MyDomain.com.conf looks normal too: (redacted IP and Domain from below for personal privacy)
<VirtualHost ***.***.***.***:80>
ServerAdmin *********@********.com
ServerName img.********.com
DocumentRoot /var/www
ErrorLog /var/www/logs/error.log
</VirtualHost>
The only thing I changed besides the OS upgrade was /etc/apache2/sites-available/mydomain.com to /etc/apache2/sites-available/mydomain.com.conf as the newer apache2 wants the .conf at the end of the site's configuration file in order to enable to site as such: a2ensite mydomain.com.conf
Please kindly advise if there is anything I can do to get my image host back online as I am completely at a loss for answers and the closest thing I could find was a wjunction post where the only responses were one from some bonehead who said Chevereto is a terrible image hosting script and another from someone who said to PM him on Skype (probably to charge him for support)... :\