{"id":3264,"date":"2014-02-27T15:32:08","date_gmt":"2014-02-27T21:32:08","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=3264"},"modified":"2025-07-22T04:21:51","modified_gmt":"2025-07-22T09:21:51","slug":"speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/","title":{"rendered":"Speed-up NGINX using ngx_pagespeed on CentOS 6"},"content":{"rendered":"<div id=\"bsf_rt_marker\"><\/div>\n<h5 class=\"wp-block-heading\" id=\"h-status-this-os-is-no-longer-supported\">Status: This OS is no longer supported<\/h5>\n\n\n\n<p class=\"wp-block-paragraph\"><em>This article, &#8220;Speed-up NGINX using ngx_pagespeed on CentOS 6,&#8221; covers a version of CentOS that reached end of life (EOL). It is no longer supported. As such, this guide is no longer maintained. If you are currently operating a server running CentOS 6, we highly recommend contacting <a href=\"https:\/\/www.rosehosting.com\/support\/\">RoseHosting&#8217;s fully managed support<\/a>. They can upgrade or migrate you to a supported version of AlmaLinux.<\/em><\/p>\n\n\n\n<!--more-->\n\n\n<p><a href=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\"><img decoding=\"async\" class=\"alignleft size-medium wp-image-1693\" src=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6-300x257.png\" alt=\"Speed-up NGINX using ngx_pagespeed in CentOS 6 VPS\" width=\"300\" height=\"257\" srcset=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6-300x257.png 300w, https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png 350w\" sizes=\"(max-width: 300px) 100vw, 300px\" \/><\/a>The following article will guide you through the steps of compiling and installing <strong>Nginx<\/strong> and <strong>ngx_pagespeed<\/strong> module on your Linux VPS<\/p>\n<p>Using <a title=\"ngx_pagespeed\" href=\"https:\/\/developers.google.com\/speed\/pagespeed\/module\" target=\"_blank\" rel=\"noopener noreferrer\">ngx_pagespeed<\/a> you can significantly speed-up your websites without needing to tune or change your web-applications.<\/p>\n<p>How is this possible?<\/p>\n<p><strong>ngx_pagespeed<\/strong> runs as a module inside <strong>Nginx<\/strong> and rewrites your webpages to make them faster. The rewrite includes <strong>minifying CSS and JS (JavaScript)<\/strong>, <strong>extending cache lifetimes<\/strong>, <strong>compressing images<\/strong> and many other web performance best practices.<\/p>\n<h3><strong>UPDATE THE SYSTEM<\/strong><\/h3>\n<p>Before proceeding any further, make sure you are in a screen session and check if your <b><a title=\"CentOS VPS Hosting\" href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\" target=\"_blank\" rel=\"noopener noreferrer\">CentOS 6<\/a> VPS<\/b> is fully up-to-date by running:<\/p>\n<pre>## screen -U -S pagespeed-screen\n## yum update<\/pre>\n<h3><strong>INSTALL DEPENDENCIES<\/strong><\/h3>\n<p>Since we are going to compile Nginx and ngx_pagespeed from source, we need to install some required packages on the system using <code>yum<\/code><\/p>\n<pre>## yum install gcc-c++ pcre-devel pcre-devel zlib-devel make unzip openssl-devel<\/pre>\n<h3><strong>DOWNLOAD NGX_PAGESPEED AND PSOL<\/strong><\/h3>\n<p>Proceed with downloading <strong>ngx_pagespeed<\/strong> and <strong>PSOL (PageSpeed Optimization Libraries)<\/strong> to <code>\/opt\/nginx\/modules<\/code><\/p>\n<pre>## mkdir -p \/opt\/nginx\/modules\n## cd \/opt\/nginx\/modules\n## wget https:\/\/github.com\/pagespeed\/ngx_pagespeed\/archive\/release-1.7.30.3-beta.zip\n## unzip release-1.7.30.3-beta.zip\n## cd ngx_pagespeed-release-1.7.30.3-beta\/\n## wget https:\/\/dl.google.com\/dl\/page-speed\/psol\/1.7.30.3.tar.gz\n## tar -xzf 1.7.30.3.tar.gz<\/pre>\n<h3><strong>DOWNLOAD AND COMPILE NGINX<\/strong><\/h3>\n<p>Next, download <code>NGINX<\/code> and build it with <code>ngx_pagespeed<\/code> support<\/p>\n<pre>## cd \/opt\/nginx\/\n## wget http:\/\/nginx.org\/download\/nginx-1.4.5.tar.gz\n## tar -zxf nginx-1.4.5.tar.gz\n## cd nginx-1.4.5\/\n## .\/configure --add-module=\/opt\/nginx\/modules\/ngx_pagespeed-release-1.7.30.3-beta \\\n--prefix=\/usr\/local\/nginx \\\n--sbin-path=\/usr\/local\/sbin\/nginx \\\n--conf-path=\/etc\/nginx\/nginx.conf \\\n--error-log-path=\/var\/log\/nginx\/error.log \\\n--http-log-path=\/var\/log\/nginx\/access.log \\\n--pid-path=\/run\/nginx.pid \\\n--lock-path=\/run\/lock\/subsys\/nginx \\\n--with-http_ssl_module \\\n--with-http_stub_status_module \\\n--with-http_gzip_static_module \\\n--without-mail_pop3_module \\\n--without-mail_imap_module \\\n--without-mail_smtp_module \\\n--user=nginx \\\n--group=nginx\n\n## make\n## make install<\/pre>\n<p>Once NGINX is compiled and installed on the system you can verify it has support for <code>ngx_pagespeed<\/code> using the following command<\/p>\n<pre>## nginx -V\n\nnginx version: nginx\/1.4.5\nbuilt by gcc 4.4.7 20120313 (Red Hat 4.4.7-4) (GCC)\nTLS SNI support enabled\nconfigure arguments: --add-module=\/opt\/nginx\/modules\/ngx_pagespeed-release-1.7.30.3-beta --prefix=\/usr\/local\/nginx --sbin-path=\/usr\/local\/sbin\/nginx --conf-path=\/etc\/nginx\/nginx.conf --error-log-path=\/var\/log\/nginx\/error.log --http-log-path=\/var\/log\/nginx\/access.log --pid-path=\/run\/nginx.pid --lock-path=\/run\/lock\/subsys\/nginx --with-http_ssl_module --with-http_stub_status_module --with-http_gzip_static_module --without-mail_pop3_module --without-mail_imap_module --without-mail_smtp_module --user=nginx --group=nginx<\/pre>\n<h3><strong>ENABLE THE MODULE<\/strong><\/h3>\n<p>Enable the <code>ngx_pagespeed<\/code> module by adding the following to your NGINX server blocks<\/p>\n<pre>...\n# enable ngx_pagespeed\npagespeed on;\npagespeed FileCachePath \/var\/ngx_pagespeed_cache;\n...<\/pre>\n<h3><strong>SET-UP INIT SCRIPT AND START NGINX<\/strong><\/h3>\n<p>Create an init script for nginx in <code>\/etc\/init.d\/nginx<\/code> and add the following<\/p>\n<pre>## vim \/etc\/init.d\/nginx\n\n#!\/bin\/sh\n#\n# nginx - this script starts and stops the nginx daemon\n#\n# chkconfig:   - 85 15 \n# description:  Nginx is an HTTP(S) server, HTTP(S) reverse \\\n#               proxy and IMAP\/POP3 proxy server\n# processname: nginx\n# config:      \/etc\/nginx\/nginx.conf\n# config:      \/etc\/sysconfig\/nginx\n# pidfile:     \/var\/run\/nginx.pid\n\n# Source function library.\n. \/etc\/rc.d\/init.d\/functions\n\n# Source networking configuration.\n. \/etc\/sysconfig\/network\n\n# Check that networking is up.\n[ \"$NETWORKING\" = \"no\" ] &amp;&amp; exit 0\n\nnginx=\"\/usr\/local\/sbin\/nginx\"\nprog=$(basename $nginx)\n\nNGINX_CONF_FILE=\"\/etc\/nginx\/nginx.conf\"\n\n[ -f \/etc\/sysconfig\/nginx ] &amp;&amp; . \/etc\/sysconfig\/nginx\n\nlockfile=\/var\/lock\/subsys\/nginx\n\nmake_dirs() {\n   # make required directories\n   user=`$nginx -V 2&gt;&amp;1 | grep \"configure arguments:\" | sed 's\/[^*]*--user=\\([^ ]*\\).*\/\\1\/g' -`\n   if [ -z \"`grep $user \/etc\/passwd`\" ]; then\n       useradd -M -s \/bin\/nologin $user\n   fi\n   options=`$nginx -V 2&gt;&amp;1 | grep 'configure arguments:'`\n   for opt in $options; do\n       if [ `echo $opt | grep '.*-temp-path'` ]; then\n           value=`echo $opt | cut -d \"=\" -f 2`\n           if [ ! -d \"$value\" ]; then\n               # echo \"creating\" $value\n               mkdir -p $value &amp;&amp; chown -R $user $value\n           fi\n       fi\n   done\n}\n\nstart() {\n    [ -x $nginx ] || exit 5\n    [ -f $NGINX_CONF_FILE ] || exit 6\n    make_dirs\n    echo -n $\"Starting $prog: \"\n    daemon $nginx -c $NGINX_CONF_FILE\n    retval=$?\n    echo\n    [ $retval -eq 0 ] &amp;&amp; touch $lockfile\n    return $retval\n}\n\nstop() {\n    echo -n $\"Stopping $prog: \"\n    killproc $prog -QUIT\n    retval=$?\n    echo\n    [ $retval -eq 0 ] &amp;&amp; rm -f $lockfile\n    return $retval\n}\n\nrestart() {\n    configtest || return $?\n    stop\n    sleep 1\n    start\n}\n\nreload() {\n    configtest || return $?\n    echo -n $\"Reloading $prog: \"\n    killproc $nginx -HUP\n    RETVAL=$?\n    echo\n}\n\nforce_reload() {\n    restart\n}\n\nconfigtest() {\n  $nginx -t -c $NGINX_CONF_FILE\n}\n\nrh_status() {\n    status $prog\n}\n\nrh_status_q() {\n    rh_status &gt;\/dev\/null 2&gt;&amp;1\n}\n\ncase \"$1\" in\n    start)\n        rh_status_q &amp;&amp; exit 0\n        $1\n        ;;\n    stop)\n        rh_status_q || exit 0\n        $1\n        ;;\n    restart|configtest)\n        $1\n        ;;\n    reload)\n        rh_status_q || exit 7\n        $1\n        ;;\n    force-reload)\n        force_reload\n        ;;\n    status)\n        rh_status\n        ;;\n    condrestart|try-restart)\n        rh_status_q || exit 0\n            ;;\n    *)\n        echo $\"Usage: $0 {start|stop|status|restart|condrestart|try-restart|reload|force-reload|configtest}\"\n        exit 2\nesac<\/pre>\n<p>Create user for nginx and make the init script executable by running<\/p>\n<pre>## useradd -r nginx\n## chmod  +x \/etc\/init.d\/nginx<\/pre>\n<p>set-up pagespeed filecachepath directory<\/p>\n<pre>## mkdir \/var\/ngx_pagespeed_cache\n## chown nginx: \/var\/ngx_pagespeed_cache<\/pre>\n<p>Start and add nginx to your system start-up<\/p>\n<pre>## nginx -t\n## service nginx restart\n## chkconfig nginx on<\/pre>\n<h3><strong>TEST THE SET-UP<\/strong><\/h3>\n<p>You can simply use <code>curl<\/code> and check if headers contain <code>X-Page-Speed<\/code><\/p>\n<pre>## curl -s -I http:\/\/localhost | grep ^X-Page-Speed\nX-Page-Speed: 1.7.30.3-3721<\/pre>\n<p>Additionally, you can learn more on how to fully optimize ngx_pagespeed at <a href=\"https:\/\/developers.google.com\/speed\/pagespeed\/module\" target=\"_blank\" rel=\"noopener noreferrer\">https:\/\/developers.google.com\/speed\/pagespeed\/module<\/a><\/p>\n<hr \/>\n<p>Of course you don\u2019t have to do any of this if you use one of our <a href=\"https:\/\/www.rosehosting.com\/centos-hosting.html\">Optimized CentOS Web Hosting<\/a> services, in which case you can simply ask our expert linux admins to install this for you. They are available 24\u00d77 and will take care of your request immediately. If you are looking for more options, you can also check: <a href=\"https:\/\/www.rosehosting.com\/blog\/how-to-speed-up-your-nginx-website\/\">How to Speed up Your Nginx Website<\/a>.<\/p>\n<p><strong><span style=\"color: #ff0000;\">PS<\/span>.<\/strong> If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>","protected":false},"excerpt":{"rendered":"<p>Status: This OS is no longer supported This article, &#8220;Speed-up NGINX using ngx_pagespeed on CentOS 6,&#8221; covers a version of &#8230; <\/p>\n<p class=\"read-more-container\"><a title=\"Speed-up NGINX using ngx_pagespeed on CentOS 6\" class=\"read-more button\" href=\"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#more-3264\" aria-label=\"Read more about Speed-up NGINX using ngx_pagespeed on CentOS 6\">Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":1693,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1699,1704,13,1707],"tags":[124,157,49,402,1152],"class_list":["post-3264","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-centos","category-optimization","category-tutorials","category-web-servers","tag-centos-vps","tag-centos6","tag-nginx","tag-ngx_pagespeed","tag-rosehosting","generate-columns","tablet-grid-50","mobile-grid-100","grid-parent","grid-33"],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.7 (Yoast SEO v27.7) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting<\/title>\n<meta name=\"description\" content=\"Learn how to set up NGINX using ngx_pagespeed on CentOS 6 and enhance your website&#039;s speed without extra tuning.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Speed-up NGINX using ngx_pagespeed on CentOS 6\" \/>\n<meta property=\"og:description\" content=\"Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-02-27T21:32:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2025-07-22T09:21:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\" \/>\n\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t<meta property=\"og:image:height\" content=\"300\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Speed-up NGINX using ngx_pagespeed on CentOS 6\",\"datePublished\":\"2014-02-27T21:32:08+00:00\",\"dateModified\":\"2025-07-22T09:21:51+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/\"},\"wordCount\":438,\"commentCount\":5,\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\",\"keywords\":[\"centos vps\",\"centos6\",\"nginx\",\"ngx_pagespeed\",\"rosehosting\"],\"articleSection\":[\"CentOS\",\"Optimization\",\"Tutorials\",\"Web Servers\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/\",\"name\":\"Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\",\"datePublished\":\"2014-02-27T21:32:08+00:00\",\"dateModified\":\"2025-07-22T09:21:51+00:00\",\"description\":\"Learn how to set up NGINX using ngx_pagespeed on CentOS 6 and enhance your website's speed without extra tuning.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2013\\\/05\\\/how-to-compile-and-install-nginx-from-source-in-debian-6.png\",\"width\":350,\"height\":300},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Speed-up NGINX using ngx_pagespeed on CentOS 6\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"name\":\"RoseHosting.com\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/03\\\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/RoseHosting\",\"https:\\\/\\\/x.com\\\/rosehosting\",\"https:\\\/\\\/www.linkedin.com\\\/in\\\/rosehosting\\\/\"],\"description\":\"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.\",\"email\":\"info@rosehosting.com\",\"telephone\":\"(314) 275-0414\",\"legalName\":\"Rose Web Services LLC\",\"foundingDate\":\"2001-04-02\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"11\",\"maxValue\":\"50\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/#\\\/schema\\\/person\\\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\\\/\\\/www.rosehosting.com\",\"https:\\\/\\\/www.facebook.com\\\/rosehosting.helpdesk\"],\"url\":\"https:\\\/\\\/www.rosehosting.com\\\/blog\\\/author\\\/jwilson\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting","description":"Learn how to set up NGINX using ngx_pagespeed on CentOS 6 and enhance your website's speed without extra tuning.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/","og_locale":"en_US","og_type":"article","og_title":"Speed-up NGINX using ngx_pagespeed on CentOS 6","og_description":"Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-02-27T21:32:08+00:00","article_modified_time":"2025-07-22T09:21:51+00:00","og_image":[{"width":350,"height":300,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Speed-up NGINX using ngx_pagespeed on CentOS 6","datePublished":"2014-02-27T21:32:08+00:00","dateModified":"2025-07-22T09:21:51+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/"},"wordCount":438,"commentCount":5,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png","keywords":["centos vps","centos6","nginx","ngx_pagespeed","rosehosting"],"articleSection":["CentOS","Optimization","Tutorials","Web Servers"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/","name":"Speed-up NGINX using ngx_pagespeed on CentOS 6 | RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png","datePublished":"2014-02-27T21:32:08+00:00","dateModified":"2025-07-22T09:21:51+00:00","description":"Learn how to set up NGINX using ngx_pagespeed on CentOS 6 and enhance your website's speed without extra tuning.","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2013\/05\/how-to-compile-and-install-nginx-from-source-in-debian-6.png","width":350,"height":300},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/speed-up-nginx-using-ngx_pagespeed-on-a-centos-6-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Speed-up NGINX using ngx_pagespeed on CentOS 6"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting.com","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"],"description":"RoseHosting is a leading Linux hosting provider, serving thousands of clients world-wide since 2001.","email":"info@rosehosting.com","telephone":"(314) 275-0414","legalName":"Rose Web Services LLC","foundingDate":"2001-04-02","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"11","maxValue":"50"}},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/0985fed6af04cc60703d2ecf27c65dfa373e0ca00eb21c0b03477e099ea3f99f?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3264","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=3264"}],"version-history":[{"count":2,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3264\/revisions"}],"predecessor-version":[{"id":50872,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3264\/revisions\/50872"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/1693"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=3264"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=3264"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=3264"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}