Lighttpd is an open-source web server more optimized for speed-critical environments than common products while remaining standards-compliant, secure and flexible.

In this tutorial I will show you how yo install Lighttpd on Debian with PHP-FPM and MySQL support.

Step1. Install MySQL

apt-get install mysql-server mysql-client libmysqlclient16

Make sure that you provide a strong password for the MySQL root user.

Step2. Install Lighttpd on Debian

apt-get install lighttpd

You can access now this page http://localhost/index.lighttpd.html from your browser and you should see the Lighttpd default page

light

Continue Reading…

5 Steps to Secure your SSH Server

Valic —  February 5, 2013 — 3 Comments

SSH is the standard method for Admin’s to connect to Linux servers securely. But the default install of SSH server way far from perfect and may allow attackers to hack your server. This guide shows you how to secure your SSH server in few steps

1. Use Strong SSH Passwords

Try to make all your passwords more secure by following next rules:

  • Try to use minimum of 8 characters
  • Use upper and lower case letters
  • Also use  numbers in your password
  • special characters like #$&*

You have also a password generator in Linux called pwgen. Install and use it with the following commands:

apt-get install pwgen

pwgen command will generate a list of passwords of 8 characters. You can use the man documents to find more options.

2. Disable SSH root logins Continue Reading…

SED useful commands

Valic —  February 5, 2013 — Leave a comment

1. How to remove lines ending with ‘baddump’ from a text file:

You’ve got a file with a bunch of lines end with “baddump”  and you need those lines to be removed completely without leaving any blank lines behind? This is the command to do it:

sed -i '/baddump$/d' file

2. You have text files with tons of empty lines and you want to get rid of those in one second?

sed '/^$/d' file > new_file

You may have multiple html files to correct at the same time.You can do that with foreach command:

foreach file (*html)
sed '/^$/d' $file > new_files Continue Reading...

HTML stands for Hyper Text Markup Language. Here, Hyper basically refers to non-linear characteristic. It does not follow any particular segment for computer programming. It means a website page can be opened and viewed from anywhere, anytime, and through any type of computing medium. Text refers to the input format, here basically English alphabet and numerical. Markup is simply the overall writing or coding structure. language is the mode in which the entire coding is written.

HTML is used for developing webpages. HTML is also sometimes used in creating document pages. But these pages cannot be read normally like those being created via word processors. HTML pages can be viewed only through a browser that support this particular language. In this world, there are not a single web browser present that does not support HTML based pages. It is through the help of web browsers that HTML coded articles can be read. However, there are special software tools also available for this purpose. HTML code read, CSS file reader, etc. are available in plenty.

One thing to keep in mind: HTML codes are written using a word processors like MS-Word, Notepad, or even Open Office. Once the code is written, save it in one of the following formats: TEXT or ASCII TEXT DOS. For beginners who have just started writing HTML, they often have a tendency to save every single page in a separate folder. But, this is a process that is not required at all. Simply save the pages in a single folder of the hard drive. A very important suggestion to give and follow: when saving these files, always click the “Save As” tab. This will ensure that the files are not being saved to its default format. If the normal “Save” tab is clicked, then the file will get saved in its default format. But that is not required. The file should be saved in TEXT or ASCII TEXT DOS format only. Always remember, when saving a file in word processor in formats other than the above two mentioned ones, then lot of other settings also gets saved like margin setting, word fonts, etc. But these settings are not required at all. Only the text is needed. This can be obtained only if the word file is saved in TEXT or ASCII TEXT DOS format. Continue Reading…

If you are getting “too many open files” error this  is how to fix it.

To change the file descriptor setting you need to add the line fs.file-max=50000 to the kernel parameters file /etc/sysctl.conf

echo "fs.file-max = 500000” >> /etc/sysctl.conf

OR

Open /etc/sysctl.conf file with any editor and add the fs.file-max=50000  line to the file.

To apply all changes run the following command:

sysctl -p

The final step is to change the ulimit setting hard and soft limits. Continue Reading…

Page 6 of 44« First...234567891011...203040...Last »