Tips, Tricks, Guides

Apache, Ubuntu, CentOS: Virtual Host Configuration

What is Virtual Hosting?

Virtual Hosting is a technique by which web servers can serve more than one domain name on the same server. It can also be a variation of serving different sites on the same IP but on different ports.
Continue Reading…


MediaWiki: The requested URL /index.php/Main_Page was not found on this server

Some possible solutions to this problem:

i) Check if .htaccess file is making any redirections

ii) Check if /LocalSettings.php have any invalid reference to root

ii) If you have freshly installed the server, check if AppArmor or SELinux is installed on the machine. If it is try to remove those software and try you website url.

To remove appArmor follow the below steps:

$ /etc/init.d/apparmor stop
$ update-rc.d -f apparmor remove
$ apt-get remove apparmor apparmor-utils


Ubuntu: Destination host unreachable

Possible causes:

Check how many network cards are installed in your system and if you are configuring the correct NIC card

Check the interfaces configuration settings

$ cat /etc/network/interfaces

Do not forget to restart the networking daemon after each change
$ sudo /etc/init.d/networking restart
Continue Reading…


Ubuntu: How to check if network configuration files work as expected?

After base Ubuntu installation, you have to configure the network interface file to get the network settings via DHCP/static IP address (if you haven’t configured during the initial installation). For this you need to edit /etc/network/interfaces file

$ vi /etc/network/interfaces
Continue Reading…


Linux: How to change the default Run Level?

To list the current run level
$ who -r
run-level 5 2008-07-22 21:35 last=5

To change the default Run level edit /etc/inittab

You can also switch to another run level number by issuing
$ init

For example,
$ init 3

Now the system switches from Run level 5 to Run level 3

To list the current run level
$ who -r
run-level 3 2008-07-22 22:35 last=5

In the above result notice the last part which states “last=5”. This indicates that the last run level was 5

When the system is running and if we want to apply patches or alter certain configurations, the above command comes in handy.

The other option to change the current level is
$ telinit <run level number>


Linux: How to find the current Run Level?

Default init level is set in /etc/inittab.

$ cat /etc/inittab (to display the init levels)

Inside that file, you can note a line which will state the run level number like
id:5:initdefault: (indicating run level 5 which means that the system is running with x windows)

To find the current run level you can execute the following commands

$ who -r
run-level 5 2008-07-22 21:35 last=5
which indicates that the system is in run-level 5

Other option to find the run level is
$ /sbin/runlevel
N 5

To find out what sub processes are associated with each run level you can go to
$ cd /etc/rcN.d/ (Where N denotes the run level number)

For example
$ cd /etc/rc1.d/
$ ls -l

This will list symbolic links to various processes associated with run level 1.


Ubuntu Release Download checksum

A quick note on the links related where to find the ubuntu releases and how to do a checksum to ensure that the downloaded copy

If you are downloading Ubuntu from the official site, MD5/SHA1 checksum (ubuntu hashes) for latest releases may not be listed there.

If it is not there, you can visit the site This site lists a comprehensive list of ubuntu releases and their checksums. Checksums ensure that the download is complete without corruption and is 100% accurate. So, it is always advisable to do a checksum after each download.
Continue Reading…


Linux: How many Run Levels are there and what are they?

Linux systems have 7 Run Levels and they are as follows.

0 – system halt
1 – single user mode (system maintenance mode)
2 – multiuser mode without network access
3 – full multiuser mode with network access
4 – not used
5 – multiuser mode with X windows
6 – reboot or restart

Each run level in linux has a very specific purpose.

Run level 1 is also known as system maintenance mode and at this level the system prompt appears without root level password. It should be used only when it is absolutely necessary for system maintenance.

Run level 4 is not used and it can be used by the user to customize his own level.

Note: Solaris Run Level is different from Linux run levels.


Apache: How to save configuration settings without disconnecting users from web server?

There are times when you would like to do some changes in your web server configuration file which might necessitate the server to be restarted in order for the changes to take effect.

Issuing a apache restart command will forcefully close all the connections made to the web server which will end any user related activity on the server.

If you would want to avoid such scenarios then issue the following command

$ sudo /etc/init.d/apache2 graceful (in ubuntu)

Kurinchi Calendar
September 2018
« Oct