Archive for the ‘Linux’ Category

Nginx server_names_hash_bucket_size problem

Today I defined a new site on my Nginx server. This new site I defined has a long domain name. When I tried to restart the Nginx I got the following error message. Restarting nginx: 2010/05/03 09:25:08 [emerg] 4452#0: could not build the server_names_hash, you should increase server_names_hash_bucket_size: 32 nginx. Tweet This Post

Read the rest of this entry »

Ubuntu avahi-daemon creates problem resolving FQDNs ending with .local

I have started to use .local dns extension for my local network. After changing my complete network configuration I realized that some of my Ubuntu machines can resolve the FQDNs ending with .local (Ex: testhost.digitalpains.local ) correctly. ali@advance17:/home/ali$ ping testhost.digitalpains.local ping: unknown host testhost.digitalpains.local   ali@advance17:/home/ali$ ping testhost PING testhost.feasiblesolutions.local (192.168.7.2) 56(84) bytes of data. [...]

Read the rest of this entry »

Automatic Security Updates on Ubuntu.

There are different options for automatically updating your server. At this article we will use the unattended-upgrades package. We will start with installing the unattended-upgrades package. kok@fhome:~$ sudo apt-get install unattended-upgrades After installing the unattended-upgrades package we need to add  the text below to the  /etc/apt/apt.conf.d/10periodic file. APT::Periodic::Update-Package-Lists “1″; APT::Periodic::Download-Upgradeable-Packages “1″; APT::Periodic::AutocleanInterval “5″; APT::Periodic::Unattended-Upgrade “1″; [...]

Read the rest of this entry »

Configuring Yum To Work With Proxy Server

Most of the  production servers  has limited connectivity to the Internet. If they have any connectivity then probably it  will be through a forward proxy server. If your server is behind the proxy server, then you need to provide proxy server details in /etc/yum.conf.. The proxy setting must specify the proxy server as a complete [...]

Read the rest of this entry »

Installing Ruby On Rails on Ubuntu

Ruby on Rails distributed with GEM packaging system. If you are installing Rails on Ubuntu probably you will end up using Ubuntu packaging system and GEM in combination. For a proper installation you need to do series of actions. A friend of mine, Umur Ozkul, has written an article for Rails Installation. It is written [...]

Read the rest of this entry »

SMTP Reply Codes

SMTP Reply Codes Code Meaning 200 (nonstandard success response, see rfc876) 211 System status, or system help reply 214 Help message 220 <domain> Service ready 221 <domain> Service closing transmission channel 250 Requested mail action okay, completed 251 User not local; will forward to <forward-path> 354 Start mail input; end with <CRLF>.<CRLF> 421 <domain> Service [...]

Read the rest of this entry »

Cleaning up your system and removing old kernels.

With every new kernel update, you receive another boot loader menu item. It will also eat up space from your /boot partition. If you don’t want your /boot partition to be filled up, then you need to remove some of the old kernels. How do we do it? First let’s get the list of kernels [...]

Read the rest of this entry »

HTTP Status Codes

I have found very nice classification of http status codes. It helps you get an quick overview of status codes. Category Error Code 2xx: Successful 200 OK 3xx: Redirection 301 Moved permanently 302 Found, look elsewhere (Moved temporarily) 4xx: Client Errors 403 Forbidden 404 Not Found 5xx: Server Errors 500 Internal Server Error Tweet This [...]

Read the rest of this entry »

Updating your system time with date command.

If you use date command without any parameter, it will print the current date and time. [root@centos ~]# date Thu Jan 7 18:33:48 CET 2010 You can use the same command to set/change your system date and time. Notation for this usage as listed below. date MMDDhhmmYYYYY Let’s say that we would like to set [...]

Read the rest of this entry »

Changing SSH port of server. Simple yet effective security measure.

Any server you put on the Internet will be subject automated and targeted attacks. If you look at your auth.log file you would see that your servers are constantly scanned and attacked. %99 of the attacks are automated and targeting standard ssh port (22). Try this command on your server. You can change the date [...]

Read the rest of this entry »