Hi all,
I have a VPS with Linode and I have installed all the software necessary (mysql, apache2, php5) on Ubuntu 14.04 x64 to host joomla and wordpress websites. Wordpress websites work fine, even with W3 Total Cache's minify settings on.
Example:
A minified JS resource from my wordpress site
http://salvatoremarchetti.com/alukal/wp ... bhc_PFw.jsThe problem is on the Joomla site with jbetolo installed. The configuration.php has the setting: public $gzip = '1';
However the gzipped resources in the source code do not work. When accessed they throw a "Restricted access" error.
Example:
Not working example of new site
http://www.salvatoremarchetti.com/inasi ... ag=5184000This site is a clone of the original site (a shared server which I will have to leave soon) where the same resource works perfectly.
Working example on original site:
http://www.associazioneculturaleinasia. ... ag=5184000On the VPS server where I have problems I have used the following commands to install zlib and zip:
In /etc/apt/sources.list I added to the bottom: deb
http://us.archive.ubuntu.com/ubuntu saucy main universe
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install zlibc zlib1g zlib1g-dev zlib-bin libgcrypt11-dev
sudo nano /etc/php5/apache2/php.ini
(here I made the following changes)
zlib.output_compression = On
zlib.output_compression_level = -1
implicit_flush = Off
cgi.fix_pathinfo = 1
extension=zip.so
sudo apt-get install apache2-mpm-worker libapache2-mod-fastcgi php5-fpm
sudo a2enmod actions alias fastcgi
Then in /etc/apache2/mods-enabled/fastcgi.conf
I inserted:
AddHandler php5-fcgi .php
Action php5-fcgi /php5-fcgi
Alias /php5-fcgi /usr/lib/cgi-bin/php5-fcgi
FastCgiExternalServer /usr/lib/cgi-bin/php5-fcgi -socket /var/run/php5-fpm.sock -pass-header Authorization
sudo service apache2 restart && sudo service php5-fpm restart
sudo mkdir /var/www/cgi-bin
sudo touch /var/www/cgi-bin/php5.fcgi
sudo chown -R www-data:www-data /var/www/cgi-bin
sudo nano /etc/apache2/mods-enabled/fastcgi.conf
This file currently looks like this:
<IfModule mod_fastcgi.c>
AddHandler fastcgi-script .fcgi
#FastCgiWrapper /usr/lib/apache2/suexec
FastCgiIpcDir /var/lib/apache2/fastcgi
Alias /php5.fcgi /var/www/cgi-bin/php5.fcgi
AddType application/x-httpd-fastphp5 .php
Action application/x-httpd-fastphp5 /php5.fcgi
FastCGIExternalServer /var/www/cgi-bin/php5.fcgi -socket /var/run/php5-fpm.sock
<Directory "/var/www/cgi-bin">
Order allow,deny
<Files "php5.fcgi">
Order deny,allow
</Files>
</Directory>
</IfModule>
and changed my conf file: /etc/apache2/sites-available/salvatoremarchetti.com.conf
# domain: salvatoremarchetti.com
# public: /home/my_user_name/public/salvatoremarchetti.com/
<VirtualHost *:80>
# Admin email, Server Name (domain name), and any aliases
ServerAdmin
webmaster@salvatoremarchetti.com ServerName salvatoremarchetti.com
ServerAlias salvatoremarchetti.com
ServerAlias
http://www.salvatoremarchetti.com # Index file and Document Root (where the public files are located)
DirectoryIndex index.html index.php index.htm
DocumentRoot /home/my_user_name/public/salvatoremarchetti.com/public
<Directory /home/my_user_name/public/salvatoremarchetti.com/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order allow,deny
Allow from all
Require all granted
</Directory>
# Log file locations
LogLevel warn
ErrorLog /home/my_user_name/public/salvatoremarchetti.com/log/error.log
CustomLog /home/my_user_name/public/salvatoremarchetti.com/log/access.log combined
ExpiresActive on
ExpiresByType image/jpg "access plus 60 days"
ExpiresByType image/png "access plus 60 days"
ExpiresByType image/gif "access plus 60 days"
ExpiresByType image/jpeg "access plus 60 days"
ExpiresByType text/css "access plus 1 days"
ExpiresByType image/x-icon "access plus 1 month"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType application/javascript "access plus 1 week"
</VirtualHost>
After that I did this:
sudo a2enmod deflate
At the bottom of: /etc/apache2/apache2.conf I added: Include httpd.conf
I created an empty httpd.conf file in /etc/apache2/httpd.conf
and pasted in it:
LoadModule deflate_module modules/mod_deflate.so
sudo ln -s /etc/apache2/mods-available/deflate.load /etc/apache2/mods-enabled/
sudo service apache2 restart
It is obvious that somewhere along the line I have made a huge mess of it all. I have a feeling that if I uninstalled this bit and reinstalled it in some other way it would work but I don't know what the problem is and don't know how to solve it.
Any help will be appreciated.
thanks in advance