This repository was archived by the owner on Apr 10, 2025. It is now read-only.
  
  
  - 
                Notifications
    
You must be signed in to change notification settings  - Fork 157
 
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.
cd mod_pagespeed/devel/
make apache_install_conf && make apache_debug_restart
cd ngx_pagespeed/
scripts/rebuild.sh
RUN_TESTS=false test/run_tests.sh
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.
curl localhost:8080/mod_pagespeed_example/
curl localhost:8050/mod_pagespeed_example/
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@@.
http_proxy=localhost:8083 curl pagespeed-on.example.com/mod_pagespeed_example/
http_proxy=localhost:8051 curl pagespeed-on.example.com/mod_pagespeed_example/
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