-
Notifications
You must be signed in to change notification settings - Fork 155
Updating modpagespeed.com and ngxpagespeed.com
Currently only team members at We-Amp have logins on these servers, so if you're outside We-Amp you'll need to ask someone else to make the change for you.
modpagespeed.com and ngxpagespeed.com are served by VPSes on GCE, and run mod_pagespeed and ngx_pagespeed respectively to demonstrate their functionality. Additionally, modpagespeed.com serves the mod_pagespeed, ngx_pagespeed, and psol documentation.
When making a change to the user facing docs, which are in mod_pagespeed/html/doc
and served under modpagespeed.com/doc/, do:
ssh [email protected]
cd doc/mod_pagespeed
git pull
When we do a new release cut from master, like 1.12.34.1, we update both servers with an updated set of examples pages, we update the psol/ documentation on modpagespeed.com, and we copy the mod_pagespeed binaries to modpagespeed.com
You should have, from earlier in the release process:
- The packages for the release.
- mod_pagespeed_examples.tar.gz
- psol_doc.tar.gz
# Set the RELEASE environment variable:
export RELEASE=1.2.24.1
# Copy the packages so users can download them later (when it's been superseded):
sudo mkdir /var/www/html/release_archive/$RELEASE
sudo mv ~/mod-pagespeed-*${RELEASE}* /var/www/html/release_archive/$RELEASE/
sudo chmod 444 /var/www/html/release_archive/$RELEASE/*
# Install the new module:
sudo apt-get update
sudo apt-get upgrade # ensure it updates to the correct version!
sudo service apache2 restart
# Copy the new examples over:
sudo /var/www/scripts/install_examples.sh $RELEASE
Verify that your new version is visible on the internet, by browing to http://modpagespeed.com/. Check for some new feature.
Install the PSOL documentation you scp'd to modpagespeed.com earlier:
sudo mv ~/psol_doc.tar.gz /var/www/html/release_archive/$RELEASE/
sudo mkdir /var/www/html/psol-$RELEASE
sudo tar -C /var/www/html/psol-$RELEASE -xzf /var/www/html/release_archive/$RELEASE/psol_doc.tar.gz
sudo chmod -R ugo+r /var/www/html/psol-$RELEASE
sudo chmod -R ugo-w /var/www/html/psol-$RELEASE
sudo find /var/www/html/psol-$RELEASE -type d -exec chmod +x {} \;
sudo rm -f /var/www/html/psol
sudo ln -s psol-$RELEASE/html /var/www/html/psol
Verify that your new version is visible on the internet, by browing to http://modpagespeed.com/psol/. Check the version at the top.
If you update /etc/httpd/conf.d/pagespeed.conf
for any reason, make sure that modpagespeed.com has gzip enabled by adding this stanza:
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip
From an open-source checkout of the release branch, run install/prepare_ngx_pagespeed_examples.sh
and follow the instructions to update ngxpagespeed.com:
$ cd install/
$ ./prepare_ngx_pagespeed_examples.sh
Building ngx_pagespeed_example.tar.gz ...
... built
Now scp it up to ngxpagespeed.com, and run:
tar -xzf ngx_pagespeed_example.tar.gz
sudo rm -rf /usr/local/nginx/html
sudo mv ngx_pagespeed_example /usr/local/nginx/html
sudo chmod ugo+rwX -R /usr/local/nginx/html
Run the automated installation for ngx_pagespeed:
bash <(curl -f -L -sS https://ngxpagespeed.com/install) \
--nginx-version latest \
--ngx-pagespeed-version YOUR-BETA-RELEASE
--additional-nginx-configure-arguments '--with-http_ssl_module'
Then if that succeeds run:
sudo service nginx restart
When the existing certs are expiring, you should follow the instructions in the email. This will leave you with modpagespeed.com.chained.pem
(signed public key, with intermediates, from the ticket) and modpagespeed.com.key
(private key, from the tool that generated the certificate signing request). These are valid for both modpagespeed.com and ngxpagespeed.com. Look at their existing webserver configs to find out where the current keys are, move the current keys to backup locations (foo -> foo.old) and put in the new certs.