http://www.allmyfaves.com/
Showing posts with label General Linux. Show all posts
Showing posts with label General Linux. Show all posts
Thursday, October 24, 2013
Friday, October 18, 2013
A basic template for website Search Engine Optimisation
Here are some basic tips on optimising your site for Google and other search engines.
Use keywords:

Other optimisation tips:
Use keywords:
- in your META keywords (128 characters max)
- in your META description (keep keyword close to the left but in a fill sentence).
- in the page title at the far left but possibly not as the first word
- in the first portion of the page (first sentence of the first full paragraph)
- in an H3 or larger tag heading
- in bold in the lower half of the page (anywhere but the first usage on page)
- in italic in the lower half of the page (anywhere but the first usage on page)
- in the URL (directory name, filename or domain name). Do not duplicate the keyword in the URL
- in an image filename useed on the page
- in image ALT attribute
- in image TITLE attribute
- in link TITLE attribute
- in the filename of your external CSS javascript files
- in a link to a site that has a PageRank of 8 or better
Other optimisation tips:
- Use "last modified" headers if you can
- Validate your HTML. Google's parser will miss parts of web pages if they contain simple HTML errors
- Wherever possible keep the page as .html or .htm extension
- Keep the HTML below 20K. 5-15K is the ideal range
- Keep the ratio of text to HTML very high. Text should outweight HTML by significant amounts
Wednesday, October 2, 2013
Squid as a transparent proxy over ssl https
Setting up squid as a transparent proxy is fairly an easy job. If we Google for “how to set up squid as a transparent proxy” Google renders a lots of links for our reference. But it is commonly seen that when we are using transparent proxy we are unable to connect to https connection like Gmail and many more sites which https protocol for security concern. Sites which use http protocol can easily open.
Let’s understand first how squid proxy works in transparent mode. While setting up squid as a transparent proxy we can forward the entire request coming from port 80 to squid server’s port i.e. 3128 by default. When we talk about port 80 it means http protocol. What if we request for Gmail who uses https protocol and this protocol by default send request to port 443 of squid’s port, and we iptable firewall rules to forward traffic from port 80 to port 3128 and we forget about port 443 which is used by https protocol and squid is http proxy server. Now many folks may think it’s easy and forward all traffic coming from port 443 to squid port 3128. No it won’t work. Because https connection establishes a secure connection over the network and for that it uses certificate and public key private key pairs. And first of all I thanks God for RSA and DSA algorithm as it is not so easy to decrypt data which is encrypted by use of this algorithm. Squid proxy is a middle man who changes packets header and route traffic to internet world. So what we have to do is to create certificate and public key private key pair for internal network which can be used by squid client and squid server and later squid server can route your traffic to internet world. To yield faster results it is better to sign certificate from CA. self signed certificates are little bit slowing the connection. As in a transparent mode encryption and decryption done twice so it may yields result slow so I advised you to keep patience.
Steps are:
- iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 80 -j REDIRECT --to-port 3128
- iptables -t nat -A PREROUTING -i eth0 -p tcp --dport 443 -j REDIRECT --to-port 3130
Certificate and public key private key generation.
- openssl genrsa -des3 -out server. Key 1024
- openssl req -new –key -out server.csr
- openssl req -new -key server. Key -out server.csr
Steps to remove passphrase
- cp server. Key server. Key.old
- openssl rsa -in server. Key.org -out server. Key
Create server certificate
Openssl x509 -req -days 365 -in server.csr -sign.key -out server.crt
Now make some changes to squid.conf file
- http_port 3128 transparent
- https_port 3130 transparent cert=/”path to server.crt” key=/”path to server.key”.
Another easy way to create certificates and public key private key pair is using genkey utility. In order to use that you have crypto-utils package install on your machine.
Steps are:
- #yum -y install crypto-utils
- genkey -days 365 squidserver.hostname.com
- Hit next.
- Select number of bits for data encryption. Default is 1024. This command will generate random bits.
- Generate the certificate.
- I will suggest you to never used passphrase for key, because if u assigns passphrase to key then along with public key we need to share passphrase.
- Certificate and key are stored at /etc/pki/tls/certs/ and /etc/pki/tls/private/
- In squid.conf make necessary change like this
http_port 3128 transparent
https_port 3130 transparent cert=/etc/pki/tls/certs/squidserver.hostname.com.crt key=/etc/pki/tls/private/squidserver.hostname.com.key.
In order to run it in a proper way the desired way that we want we also need to configure BIND DNS for local intranet along with forwarders ON and in forwarder we need to define ISP IP Address. At Client side must define both gateway and DNS (In my Env it is Proxy server.)
How to Stop WordPress Asking for FTP details to Upgrade Plugins
- First, we need to see what user Apache is running under. Type the following into a New file in any text editor. Save As whoami.php in the /var/www directory (or wherever you set Apache to serve files from):
<?php echo(exec("whoami")); ?> - Open this file in a browser (for instance, localhost/whoami.php). It should reveal who the user is
- This tells you that the web server is running under the user webuser.
You can now give that user recursive ownership (all subfolders) of your WordPress installation using the command:chown-hR webuser:webuser /var/mydomain.com/public_html/wordpress/
Monday, September 16, 2013
RoundCube: Strict Standards: Non-static method PEAR :: setErrorHandling
When installing the messages appear
Eliminated as follows:
1. Open the file .. / installer / index.php
2. Find line
and change it to
3. If no, add this line here
Here after this
1 2 3 | PHP Strict Standards: Non-static method PEAR :: setErrorHandling () should not be called statically in / installer / utils.php on line 80 PHP Strict Standards: Non-static method rcube_install :: get_instance () should not be called statically in / installer / index.php on line 49 |
Eliminated as follows:
1. Open the file .. / installer / index.php
2. Find line
1 | ini_set ('error_reporting', E_ALL & ~ E_NOTICE); |
and change it to
1 | ini_set ('error_reporting', E_ALL & ~ (E_NOTICE | E_STRICT)); |
3. If no, add this line here
1 | define ('RCMAIL_CHARSET', 'UTF-8'); |
Here after this
1 | define ('RCMAIL_CONFIG_DIR', INSTALL_PATH. 'config'); |
Ubuntu Server 12.04 64-bit with Zoneminder 1.25.0 the easy way
http://www.zoneminder.com/wiki/index.php/Ubuntu_Server_12.04_64-bit_with_Zoneminder_1.25.0_the_easy_way
Sunday, September 15, 2013
How To Install and Configure Varnish with Apache on Ubuntu 12.04
About Varnish
Varnish is an HTTP accelerator and a useful tool for speeding up a server, especially during a times when there is high traffic to a site. It works by redirecting visitors to static pages whenever possible and only drawing on the virtual private server itself if there is a need for an active process.
Setup
To perform the steps in this tutorial, you will need to both have a user with sudo privileges and apache installed on your virtual private server.
To create a user with sudo privileges, go through the third and fourth steps of the initial ubuntu server setup tutorial
Apache can be installed on your VPS with a single command from the apt-get repository.
sudo apt-get install apache2
Step One—Install Varnish
The varnish site recommends installing the varnish package through their repository.
You can start that process by grabbing the repository:
sudo curl http://repo.varnish-cache.org/debian/GPG-key.txt | sudo apt-key add -
The next step is to add the repository to the list of apt sources. Go ahead and open up that file.
sudo nano /etc/apt/sources.list
Once inside the file, add the varnish repository to the list of sources.
deb http://repo.varnish-cache.org/ubuntu/ lucid varnish-3.0
Save and exit.
Finally, update apt-get and install varnish.
sudo apt-get update
sudo apt-get install varnish
Step Two—Configure Varnish
Once you have both apache and varnish installed, you can start to configure them to ease the load on your server from future visitors.
Varnish will serve the content on port 80, while fetching it from apache which will run on port 8080.
Let’s go ahead and start setting that up by opening the /etc/default/varnish file:
sudo nano /etc/default/varnish
Uncomment all of the lines under “DAEMON_OPTS”—under Alternative 2, and make the configuration match the following code:
DAEMON_OPTS="-a :80 \
-T localhost:6082 \
-f /etc/varnish/default.vcl \
-S /etc/varnish/secret \
-s malloc,256m"
Once you save and exit out of that file, open up the default.vcl file:
sudo nano /etc/varnish/default.vcl
This file tells varnish where to look for the webserver content. Although Apache listens on port 80 by default, we will change the settings for it later. Within this file, we will tell varnish to look for the content on port 8080. The configuration should like this:
backend default {
.host = "127.0.0.1";
.port = "8080";
}Step Three—Configure Apache
So far we have told varnish that apache ports will be running on 8080. However the default settings for apache are still on port 80. We will correct the discrepancy now.
Open up the apache ports file:
sudo nano /etc/apache2/ports.conf
Change the port number for both the NameVirtualHost and the Listen line to port 8080, and the virtual host should only be accessible from the localhost. The configuration should look like this:
NameVirtualHost 127.0.0.1:8080
Listen 127.0.0.1:8080
Change these settings in the default virtual host file as well:
sudo nano /etc/apache2/sites-available/default
The Virtual Host should also be set to port 8080, and updated line looks like this:
<VirtualHost 127.0.0.1:8080>
Save and exit the file and proceed to restart Apache and Varnish to make the changes effective.
sudo service apache2 restart
sudo service varnish restart
Accessing your domain should instantly take you to the varnish cached version, and you can see the details of varnish’s workings with this command:
varnishstat
Thursday, September 12, 2013
frontpage-2002-sr1.2.i386 has missing requires of libexpat.so.0
Error
frontpage-2002-sr1.2.i386 has missing requires of libexpat.so.0
Solution
Please follow these steps exactly
- SSH into your server
- Open the file /etc/yum.conf in your favorite text editor (nano is what I am using)
nano /etc/yum.conf
- You will find a line that starts with “Exclude”, most likely the first line. You will find perl* written in there.
- Delete the text “perl*” from the line. Note that there would be many extensions listed, you just need to remove “perl*”
- Save the file
- Execute “yum update“
That should be all. Your issue should now be fixed. Feel free to commend here if you run into any further errors.
- See more at: http://linuxlantern.com/frontpage-2002-sr1-2-i386-has-missing-requires-of-libexpat-so-0/#sthash.mtcelAQQ.dpuf
Friday, May 10, 2013
How to minotor live Squid traffic in GUI
SqStat
#cd /var/www
#wget http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
#tar -zxvf sqstat-1.20.tar.gz
#cd sqstat-1.20
#mv config.inc.php.defaults config.inc.php
#mv sqstat.php index.php
test di browser anda :
http://192.168.169.2/sqstat-1.20/index.php
#cd /var/www
#wget http://samm.kiev.ua/sqstat/sqstat-1.20.tar.gz
#tar -zxvf sqstat-1.20.tar.gz
#cd sqstat-1.20
#mv config.inc.php.defaults config.inc.php
#mv sqstat.php index.php
test di browser anda :
http://192.168.169.2/sqstat-1.20/index.php
Tuesday, May 7, 2013
What is my public IP | Linux
wget -q -O - checkip.dyndns.org|sed -e 's/.*Current IP Address: //' -e 's/<.*$//'
Sunday, May 5, 2013
Using Aliases with Filezilla-sharing additional drives to FTP
http://www.youtube.com/watch?v=9GVbDcCw0mE
Password-less login with Putty and Pageant
http://www.dailymotion.com/video/xadb3u_passwordless-login-with-putty-and-p_tech
Sunday, April 21, 2013
Wednesday, March 27, 2013
Root loging not allowed in squeeze
When i last used kde to allow root logins i edited /etc/kde3/kdm/kdmrc, look for the file in your version.
search for
change the value to "true"
- Code: Select all
editor /etc/kde3/kdm/kdmrc
search for
- Code: Select all
"AllowRootLogin"
change the value to "true"
Tuesday, March 26, 2013
This host is vt-capable but vt is disabled vmware
VT technology is disabled by default in BIOS
Goto bios and enable Virtualization Technology
Mostly under CPU option
Goto bios and enable Virtualization Technology
Mostly under CPU option
Wednesday, March 13, 2013
Booting into a Graphical Environment - Linux
If you have installed the X Window System but are not seeing a graphical desktop environment once you log into your Red Hat Enterprise Linux system, you can start the X Window System graphical interface using the command
Once you enter this command and press Enter, the graphical desktop environment is displayed.
Note, however, that this is just a one-time fix and does not change the log in process for future log ins.
To set up your system so that you can log in at a graphical login screen, you must edit one file,
Open a shell prompt. If you are in your user account, become root by typing the
Now, type
To change from a console to a graphical login, you should change the number in the line
Change only the number of the default runlevel from
Your changed line should look like the following:
When you are satisfied with your change, save and exit the file using the Ctrl-Q keys. A window appears and asks if you would like to save the changes. Click Save.
The next time you log in after rebooting your system, you are presented with a graphical login prompt.
startx.Once you enter this command and press Enter, the graphical desktop environment is displayed.
Note, however, that this is just a one-time fix and does not change the log in process for future log ins.
To set up your system so that you can log in at a graphical login screen, you must edit one file,
/etc/inittab, by changing just one number in the runlevel section. When you are finished, reboot the computer. The next time you log in, you are presented with a graphical login prompt.Open a shell prompt. If you are in your user account, become root by typing the
su command.Now, type
gedit /etc/inittab to edit the file with gedit. The file /etc/inittab opens. Within the first screen, a section of the file which looks like the following appears:# Default runlevel. The runlevels used by RHS are:
# 0 - halt (Do NOT set initdefault to this)
# 1 - Single user mode
# 2 - Multiuser, without NFS (The same as 3, if you do not have networking)
# 3 - Full multiuser mode
# 4 - unused
# 5 - X11
# 6 - reboot (Do NOT set initdefault to this)
# id:3:initdefault:
To change from a console to a graphical login, you should change the number in the line
id:3:initdefault: from a 3 to a 5.Warning
Change only the number of the default runlevel from
3 to 5.Your changed line should look like the following:
id:5:initdefault: When you are satisfied with your change, save and exit the file using the Ctrl-Q keys. A window appears and asks if you would like to save the changes. Click Save.
The next time you log in after rebooting your system, you are presented with a graphical login prompt.
Wednesday, February 27, 2013
Change Mac admin password without the disk [Solved/Closed]
Creating a new Admin on Mac Os X:
Here's how to reset your OS X password without an OS X CD.
the Working solution for me was to create a new admin
you can create new admin like this by deleting a specific file.
You need to enter terminal and create a new admin account:
1. Reboot
2. Hold apple key + s key down after you hear the chime.
(command + s keys on newer Macs)
3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and your good to go again!
Here's how to reset your OS X password without an OS X CD.
the Working solution for me was to create a new admin
you can create new admin like this by deleting a specific file.
You need to enter terminal and create a new admin account:
1. Reboot
2. Hold apple key + s key down after you hear the chime.
(command + s keys on newer Macs)
3. When you get text prompt enter in these terminal commands to create a brand new admin account (hitting return after each line):
mount -uw /
rm /var/db/.AppleSetupDone
shutdown -h now
4. After rebooting you should have a brand new admin account. When you login as the new admin you can simply delete the old one and your good to go again!
Subscribe to:
Posts (Atom)