How to install latest nginx_pagespeed along with psol ( page Speed Optimization Library )

A lot of people looking to download the Page Speed Optimization Library from google for installing nginx_pagespeed. But there is no public download url available from google. But it is easy to download the page speed optimization library as follows.

You may download the latest stable version of nginx_page speed from https://github.com/pagespeed/ngx_pagespeed/releases . At this time the latest stable version is v1.12.34.3-stable

# cd /usr/local/src
# wget -c https://github.com/pagespeed/ngx_pagespeed/archive/v1.12.34.3-stable.tar.gz
# tar -xzf v1.12.34.3-stable.tar.gz
# cd ngx_pagespeed-1.12.34.3-stable/

Now find the psol download url as follows,

# scripts/format_binary_url.sh PSOL_BINARY_URL
https://dl.google.com/dl/page-speed/psol/1.12.34.2-x64.tar.gz

This is the psol source url of the downloaded page_speed module . Now download this file and extract it

# wget https://dl.google.com/dl/page-speed/psol/1.12.34.2-x64.tar.gz
# tar -xzf 1.12.34.2-x64.tar.gz

You can see a directory named “psol” in the current directory .

Next is download and install nginx with google nginx_pagespeed<?pre>

# cd /usr/local/src
# wget -c http://nginx.org/download/nginx-1.12.2.tar.gz
# tar -xzf nginx-1.12.2.tar.gz
# cd nginx-1.12.2
# ./configure --prefix=/usr/local/nginx --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-http_flv_module --with-http_mp4_module --with-ipv6 --with-http_stub_status_module --add-module=/usr/local/src/ngx_pagespeed-1.12.34.3-stable/
# make 
# make install

That’s all the steps need to install nginx with latest google pagespeed and psol library.

How to install Reliance Netconnect Broadband+ Modem ZTE-AC2736 in Ubuntu

It is easy to install and configure Reliance Netconnect Broadband+ Modem ZTE-AC2736 in ubuntu. Please follow the procedures

1) Install the following packages
# apt-get install wvdial usb-modeswitch
2) Plug your USB modem to your laptop

3) Edit /etc/wvdial.conf and add the following lines

#——————–
[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
Baud = 460800
New PPPD = yes
Modem = /dev/ttyUSB0
ISDN = 0

[Dialer netconnect]
Username = 93********
Password = 93********
Phone = #777
Stupid Mode = 1
Inherits = Modem0
#———————–

4) Execute the following command to start connection

# wvdial netconnect

5) Open your web browser and check some speed test.

cPanel : UPCP error : Undefined subroutine & Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273

I have seen recent cPanel upgrade throwing errors are below :

# /scripts/upcp
/scripts/upcp syntax OK
Running Futex Check/Fix……Done
Undefined subroutine &Cpanel::Update::automatic_updates_enabled called at /scripts/upcp line 273.

This can be fixed using below :wget -O /root/updatenow.static http://httpupdate.cpanel.net/cpanelsync/RELEASE/scripts/updatenow.static && perl /root/updatenow.static --manual

Upgrade the cPanel :

/scripts/upcp --force

Disable sslv2 in cPanel/whm services

It is easy to disable sslv2 in cpanel / whm services ( ports 2083 , 2087, etc,. ) . To do this you need to enable stunnel from the tweak settings , After that edit the file

/usr/local/cpanel/etc/stunnel/mycabundle/stunnel.conf and add the following line ,

options = NO_SSLv2

Now restart cPanel server. This will fix the issue. And you will get pcidss compilance.

How to avoid TCP time stamp issues in linux

Hello,

Here is the solution to avoid tcp fingerprinting . This need to be added in your linux server to get pcidss compilance .

# echo “net.ipv4.tcp_timestamps = 0” >> /etc/sysctl.conf

# sysctl -p

This will fix the tcp fingerprint issue.

How to enable gzip compression in cPanel server via mod_deflate and Apache

This small tutorial will help you to enable mod_deflate gzip compression in your cPanel server. You may need to do the following procedure.

1) Do easyapache and enable mod_deflate in your apache. After finishing it create a file named /usr/local/apache/conf/deflate.conf with the following content
#———————-
<IfModule mod_deflate.c>
SetOutputFilter DEFLATE
</IfModule>
DeflateCompressionLevel 9
AddOutputFilterByType DEFLATE text/html
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/javascript
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/xhtml+xml
AddOutputFilterByType DEFLATE application/xml
AddOutputFilterByType DEFLATE application/rss+xml
AddOutputFilterByType DEFLATE application/atom_xml
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/x-httpd-php
AddOutputFilterByType DEFLATE application/x-httpd-fastphp
AddOutputFilterByType DEFLATE application/x-httpd-eruby
AddOutputFilterByType DEFLATE image/svg+xml
#——————————

2) Include the file /usr/local/apache/conf/deflate.conf inside /usr/local/apache/conf/includes/pre_main_global.conf , as follows

Include “/usr/local/apache/conf/deflate.conf”

3) Now restart your apache as follows,

/scripts/restartsrv httpd

4) Test the compressed speed of your website from http://www.whatsmyip.org/http_compression/

Nginx : accept() failed (24: Too many open files)

This solutions is application to cpnginx and danginx plugins and bare nginx server configurations.

Edit the file /etc/sysctl.conf and increase the openfile limits. Add the following line,

fs.file-max = 700000

Edit /etc/security/limits.conf and add the following lines,

nobody soft nofile 100000
nobody hard nofile 500000

Now apply the sysctl configuration using the following command .

# sysctl -p

Now edit the /usr/local/nginx/conf/nginx.conf file and add the following line.

worker_rlimit_nofile 50000;

Now stop nginx server and restart.

How to configure ssh key

SSH key is a secure authentication method of openssh server. Let us install ssh key easily between two server.

Source Server:This is the server from which I need to connect.
Destination Server: This is the server into which I am going to connect.
Let us create ssh key for the root user in source server for accessing a backup user in destination server.

Create key in Source Server:

Do the following command as root

# ssh-keygen -t rsa

Now hit Enter key until you see the shell prompt again
So now we have two keys private and public in /root/.ssh . We only need the public key

Copy public key to Destination server:

Copy the content of public key,/root/.ssh/id_rsa.pub, from source server to the destination server into the files file ( /home/backupuser/.ssh/authorized_keys . This is for ssh user “backupuser”.
Testing:
Now try ssh from the Source server to destination server as follows,

# ssh  backupuser@destinationserver

If you are in without password , then the ssh-key configuration is success. If not, your ssh key is not working, check the error logs in /var/log/secure