Skip to main content

Installation and management of Apache

First things first - before starting the operation it is necessary to update in order to get the latest versions of packages. Use the command  sudo apt-get update 
After this you can now install Apache2. Write  sudo apt-get install apache2  on to your terminal, except installation terms with Y and enter and you are ready to go.

 sudo a2enmod userdir  basically changes the location folder to user's directory, making it easier to control while all your important files stay in a one and same place. Now Terminal will ask you to restart the server and make sure you will execute it properly. 

Go to your home direction (e.g. /home/xubuntu/ Remember! if you are not sure about your identity you can always ask it by writing  whoami ).

Create a new folder  mkdir public_html  and enter. In my case I wanted to make a test file to see if my server is working. 


After saving I navigated myself into the front page. You can use your PC's IP address ( can be found with ifconfig ) and write it to a browser's URL bar (or simply type localhost).


Success! My test file appeared to localhost/~xubuntu/test so it's time to write a real HTML5-page. If you wan't your webpage to open straight in localhost/xubuntu the file name has to be index.html 



<!doctype html> Tells that this document's type is html.
<html></html> The root of html document. All your codes go inside these tags.
<head></head> Contains the information of the document (e.g. <title></title>)
<body></body> Document's body.

The final look of my webpage with the false link.

Reading the errors and user actions

Installing Apache2 didn't go as smoothly as you might think by reading this document. My first error came from very beginning after changing the directory of Apache. This is the part when I am asked to run the restart of the server (service apache2 restart).


Visiting the log doesn't really give any clues but observing the execution command enlighten my thoughts - 87: ulimit: error setting limit (operation not permitted) tells that I don't have enough authenticity to run this command. The error fixed simply by adding sudo in front of the line (sudo service apache2 restart).

 © http://xkcd.com/
Thankfully the second error was premeditated. It appeared when the user tried to get free candy from my "false link page".


Here we can see that the user visited the webpage exactly 19/Sep/2013:15:28~ and tried to click the false link to /localhost/~xubuntu/freecandy but the session ended to error 404, meaning the page wasn't found.

Linux version: Xubuntu 12.04, 64-bit

System information - OS: Windows 8 64bit Manufacturer: Dell Inc.Model: Inspiron 3721 BIOS: A05 Processor: Intel(R) Core(TM) i5-3337U CPU @ 1.80GHz (4 CPUs), ~~1,8GHz Memory: 8192MB RAM

Based on Linux course by Tero Karvinen (http://terokarvinen.com/)

Comments

Popular posts from this blog

Building Love-O-Meter by using a temperature sensor

This "Love-O-Meter" is based on the tutorial by Arduino and it comes with the starter kit. It uses a temperature sensor to measure the warmth of your skin and then starts to turn on (or off) the LEDs  indicated by the temperature.

The components Arduino UNOBreadboardJumper wiresLEDs220 ohm resistorsTMP36 temperature sensor

Building the Circuit
At first I ran the "Hello World" for Arduino to make sure the environment would work as expected. Now I could start to connect the jumper wires between Arduino UNO and the breadboard.

As usually I connected the breadboard to power (5V) and to the ground (GND). I inserted the TMP36 on the breadboard so the rounded part of the sensor would face away from Arduino.

I attached 3 LED lights and the resistors and connected them with Arduino. The lights should react to the heat of the finger and if the temperature would get hot enough all the lights would be on and would also tell you if you are a hot lover or not...

The result and the …

Using a button to control the LED light

This time my project was to configure how to build a button that would turn on and off depending if the user is pushing it or not. While holding the button down the LED should stay on until removing the finger.



For this assignment I used the fallowing components:
Arduino UNO and USBJumper wiresLED lightBreadboardButton10k ohm resistor
At first I run the "Hello World" for Arduino and made sure that the LED I was using worked properly (read my previous post).

I attached the button in the middle of the breadboard so the legs were touching the both "sides" of it.


Now I started to connect the jumper wires between the Arduino UNO and the breadboard. In order to get it working like in the sample code (Ardoino > Examples > 02.Digital > Button)
I linked the wires with Arduino's 5V (red wire, positive) and ground (black wire, negative) to the equal holes on the very corner of the breadboard (+ and -). I put the white jumper wire to connect the positive circuit to t…

Creating a Bootable USB for Kali Linux

If you are interested to see my documentation about making a bootable USB for Xubuntu please click here!

This USB was made by using the latest version of Xubuntu (the 14.04 release).

Downloading Kali Linux 
23.13. After navigating to https://www.kali.org/ I chose the version that would suit me the best and started downloading the ISO image for 64-Bit system.


USB imaging
22.40. I followed the guide offered by kali.org and used the commandsudo fdisk -lwithout plugging the USB yet. I needed to pay attention to the path of Device Boot (/dev/sdb1). After this I inserted USB and ran the same command again. Now I could see how the name of Device Boot had changed to sdc1. This would be my USB to use.

22.50 It only took a while to format the dd code correctly as the base was already given on Kali's web page. After running the correct command for the first time I got an error message "'/dev/sdc1': Permission denied". In these kind of situations I tend to ask sudo for help an…