Linux

Apache Log Files on Server

Q. How do I find out Apache http server log files location?…

Q. How do I find out Apache http server log files location? How do I change the location of Apache log file under Linux / UNIX operating system?

A. There are two type of apache httpd server log files:

Apache Error Log File

All apache errors / diagnostic information other errors found during serving requests are logged to this file. Location of error log is set using ErrorLog directive. If there is any problem, you should first take a look at this file using cat, grep or any other UNIX / Linux text utilities. This apache log file often contain details of what went wrong and how to fix it. Default error log file location:

  • RHEL / Red Hat / CentOS / Fedora Linux Apache error file location – /var/log/httpd/error_log
  • Debian / Ubuntu Linux Apache error log file location – /var/log/apache2/error.log
  • FreeBSD Apache error log file location – /var/log/httpd-error.log
Linux

Mount The Drive on Linux Ubuntu Server

Determine Drive Information We assume that the hard drive is physically installed…

Determine Drive Information

We assume that the hard drive is physically installed and detected by the BIOS.

To determine the path that your system has assigned to the new hard drive, open a terminal and run:

sudo lshw -C disk

This should produce output similar to this sample:

*-disk
description: ATA Disk
product: IC25KOLAT564-0
vendor: Hitachi
physical id: 0
bus info: ide@0.0
logical name: /dev/sdb
version: C54671A
serial: XDfeSHKD556B
size: 37GB
capacity: 37GB

Deciding which partitions to mount

Most systems only have /dev/hda, which is the hard disk drive, and /dev/hdc, which is the CD-ROM, or optical, drive. If more were listed when the command above was run, they can be identified as follows: hda is the first drive on the first IDE channel (0:0), hdb is the second drive (0:1), hdc is the third drive (1:0), and hdd is the fourth (1:1). SCSI and S-ATA disks have names like sda and sdb.

Look through the list generated above to identify the partition(s) to be mounted. The following table lists some common ‘System’ types, which may help this process.

System name English name Linux type
W95 FAT32 Microsoft FAT32 vfat
W95 FAT32 (LBA) Microsoft FAT32 vfat
W95 FAT16 (LBA) Microsoft FAT16 vfat
W95 Ext’d (LBA) Microsoft extended partition Not used
NTFS volume set Microsoft NTFS ntfs
NTFS volume set Microsoft NTFS with read-write access ntfs-3g
Apple_HFS Apple HFS hfsplus

A list of the form ‘/dev/hda1: /media/windows/ (vfat)’, where ‘/dev/hda1’ is the device, ‘/media/windows’ is the arbitrary location where the partition will appear when mounted, and ‘vfat’ is the Linux type, should be created on paper, containing all partitions to be added.

Download Ubuntu Server

How to Setup a Dedicated Web Server for Free!

1. A Quick Overview In this tutorial, we are aiming to accomplish…

1. A Quick Overview

In this tutorial, we are aiming to accomplish several things:

  •  We’re going to install the Ubuntu Server operating system. I commonly use Ubuntu because of its ease of use and simple administration. It also has a rather large and extremely active community behind it, which makes getting support a breeze.
  • We’re going to install an OpenSSH server. This allows you to administer your server from remote computers.
  • A LAMP (Linux, Apache, MySQL, and PHP) stack is going to be installed. This provides the backbone that will run your web site. Apache is the industry standard web server on Unix-based operating systems; it’s what most web hosts use (NETTUTS is using it right now!) and it’s what we’re going to use.
  • We’re going to install a firewall to protect your server from unauthorized access.

In order to follow this tutorial, you’re going to need a few items:

  • A computer to use as your server. It doesn’t need to be powerful; as long as it’s not ancient, it’ll work fine. Please don’t do this on your desktop PC; Ubuntu will completely wipe your computer.
  • A CD burner and a blank CD. These are so that you can burn Ubuntu to a disk in order to install it.
  • Time. Seriously, this process is time-consuming, especially if you run into problems. Try to set aside an afternoon to follow this tutorial.

You may be asking why you’d want to have your own web server. There are several reasons, a few of them being: you can have your own testing ground for your websites; with a little modification, you could host your own site; and, you will learn a lot about Linux/Unix as you go.

With that said, let’s get started!