The initial installation of mod_pagespeed results in it trying to use a cache
directory that can only be written by root.
From a clean Debian instance (I used an empty Google Compute Engine "debian-7"
image):
$ sudo apt-get update
$ sudo apt-get -y upgrade
$ sudo apt-get -y install apache2
$ curl -O
https://dl-ssl.google.com/dl/linux/direct/mod-pagespeed-beta_current_amd64.deb
$ sudo dpkg -i mod-pagespeed-*.deb
$ sudo apt-get -f install
$ ls -la /var/cache/
total 32
drwxr-xr-x 8 root root 4096 May 14 13:32 .
drwxr-xr-x 12 root root 4096 May 14 13:31 ..
drwxr-xr-x 3 root root 4096 May 14 13:31 apache2
drwxr-xr-x 3 root root 4096 May 14 13:32 apt
drwxr-xr-x 2 root root 4096 May 14 13:31 debconf
drwx------ 2 root root 4096 May 14 13:31 ldconfig
drwxr-sr-x 32 man root 4096 May 14 13:31 man
drwxr-xr-x 2 root root 4096 Apr 29 18:05 mod_pagespeed
$ sudo apachectl restart
At this point, /etc/apache2/mods-enabled/pagespeed.conf contains:
# The ModPagespeedFileCachePath directory must exist and be
writable
# by the apache user (as specified by the User directive).
ModPagespeedFileCachePath "/var/cache/mod_pagespeed/"
Yet that directory is only writable by root, not www-data.
Running:
$ sudo chown www-data:www-data /var/cache/mod_pagespeed/
trivially fixes it, but it would be nice to do this ourselves.
See also issue 776, which is talking about a similar problem with yum/CentOS.
Original issue reported on code.google.com by malcolm.rowe on 14 May 2014 at 2:14
The text was updated successfully, but these errors were encountered:
Original issue reported on code.google.com by
malcolm.rowe
on 14 May 2014 at 2:14The text was updated successfully, but these errors were encountered: