Month: November 2012

  • How to change recover root password in single user mode in Debian OS

    To change/recover root password in Debian,

    1) Boot server into grub, select single user.

    2) Press e to enable edit mode. Scroll down to the kernel line which starts with “linux /boot/vmlinuz-2.x…….”

    Scroll to the end of that line and press space key once only and type

    init=/bin/bash

    3) Press Crtl x to boot

    4) Remount '/' partition

    $ remount / as rw
    $ mount -rw -o remount /

    5) Change password with command

    $ passwd

    You're done !

  • [How To] Change or Update document root of domain in Plesk

    To change document root of the domain in Plesk control panel, please follow simple steps as below:

    1) Login in the Plesk admin panel and go the domain control panel.

    2) Click on Show Advance operations >  Website Scripting and Security which will take you to a new page.

    3) Make the necessary changes in the document root and save the settings.

    This will update all the configuration files related to the domain.

    That's it!

  • Difference between mod_deflate and zlib.output_compression

    Most of the Webmaster, Search Engine Optimization (SEO), Developers & Testers are concern about the overall website load time and may question about the compression from the server end. In this case, the compression can be achieved from both PHP's zlib output_compression extension and Apache's mod_gzip (old Apache version), mod_deflate module from server end.

    But one question remains unanswered is that which compression method gives good compression and increases website overall load time. Today, we are going to find answer by comparing the two options with few details.

    Apache's mod_gzip or mod_deflate module  :

    The mod_gzip or mod_deflate module is supported by Apache and provides compressed output from the server over the network to the end user which works on DEFLATE. It almost compresses all the files including the style sheets (CSS) and Java Script (JS). More about mod_deflate module can be found here.

    <IfModule mod_deflate.c>
    <IfModule mod_setenvif.c>
    BrowserMatch ^Mozilla/4 gzip-only-text/html
    BrowserMatch ^Mozilla/4\.0[678] no-gzip
    BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
    BrowserMatch \bMSI[E] !no-gzip !gzip-only-text/html
    </IfModule>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    <IfModule mod_filter.c>
    AddOutputFilterByType DEFLATE text/css application/x-javascript text/x-component text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon
    </IfModule>
    </IfModule>

    PHP's zlib.output_compression extension :

    The zlib.output_compression extension is supported by PHP and compresses only PHP handler pages hence proves less effective as it it will not compress non-PHP contents though it works on DEFLATE. More about zlib.output_compression extension can be found here.

    zlib.output_compression On

    Hence, we can say that the compression percentage achieved using Apache's mod_deflate module is good as compared to PHP's zlib output_compression considering the fact that zlib output_compression can compress only PHP handler contents.

    Hope, the post helps to clear the doubts!

Back to top button