Skip to content
This repository has been archived by the owner on Apr 21, 2023. It is now read-only.

Standing up a development server

Jeff Kaufman edited this page Jan 20, 2017 · 3 revisions

One of the most useful tools for debugging PageSpeed is just to start a server, manually send queries to it, and see what happens.

Starting the server

Apache

cd mod_pagespeed/devel/
make apache_install_conf && make apache_debug_restart

Nginx

cd ngx_pagespeed/
scripts/rebuild.sh
RUN_TESTS=false test/run_tests.sh

Sending queries

Our testing configurations have a "primary server" that doesn't care about host headers, and a "secondary server" that gets you different virtual hosts for different supplied host headers.

Primary server

Apache

curl localhost:8080/mod_pagespeed_example/

Nginx

curl localhost:8050/mod_pagespeed_example/

Secondary server

To see a list of secondary servers, look for the blocks in ngx_pagespeed/test/pagespeed_test.conf.template or mod_pagespeed/install/debug.conf.template that have @@SECONDARY_PORT@@.

Apache

http_proxy=localhost:8083 curl pagespeed-on.example.com/mod_pagespeed_example/

Nginx

http_proxy=localhost:8051 curl pagespeed-on.example.com/mod_pagespeed_example/

Logs

Looking at server logs can be useful in understanding why the server did what it did.

  • Apache uses ~/apache2/logs/error_log, shared between all mod_pagespeed checkouts on the same machine
  • Nginx uses ngx_pagespeed/test/tmp/error.log, which is just for that ngx_pagespeed checkout
Clone this wiki locally