Installing Apache Server on Ubuntu
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| LAMP Server - Linux (Ubuntu) + Apache + MySql + PHP/Pearl | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Installation Video Guide | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copy and Paste Package Manager Installs from Video | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
NOTE: Ubuntu, and Apache Server have been updated since
the video above. This Procedure has been updated since the creation of the
video.
Open the Synaptics Package Manager. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copy and Paste Command Lines from Video - Updated Procedure | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(Open "Terminal", then change to the etc directory/folder, with the (cd) change directory command
- you can copy and paste at the Terminal Cursor) (Take ownership of the apache2 directory recursively (-R) with the change owner (chown)
command - If you are not sure what YOUR user name is, use the "list all" (ls
-al) command on files and/or directories you know you own, like your Documents
folder - replace UserName with your user name using gedit to edit the line below
then copy and paste into "Terminal" at the cursor) Verify that you have ownership of the apache2 directory. ls -al (You should see your user name listed in the row for the apache2 folder - If you only see root, you did not take ownership) (Change to the
sites-enabled directory/folder
which is a sub-directory of the apache2 directory, with the (cd) change directory command) (List the files and sub-directories in the current directory you are in
-
sites-enabled) (Open the "000-default" file in Gedit (a text editor) with Root Ownership
- The sudo command lets you execute commands with "root" ownership) (Change/Edit the line AllowOveride from "None" to "All"
With Gedit then Save the changes and exit gedit) Change "Allow Override None" to: (Enable the rewrite apache module with root ownership) (Restart Apache Server - with root ownership) (Change to the var sub-directory using the cd command) ls (Take ownership of the www directory with the change owner (chown)
command - If you are not sure what YOUR user name is, use the "list all" (ls
-al) command on files and/or directories you know you own, like your Documents
folder - replace UserName with your user name using gedit to edit the line below
then copy and paste into "Terminal" at the cursor) Verify that you have ownership of the www directory. ls -al (Change to the www sub-directory using the cd command -
www is a sub-directory of the var directory) Take a look at what's there with the list command. ls You should see an index.html file. Congratulations!!! You've just installed Apache Server! Verify your apache Server is running, by opening your web
browser, and typing, or copy and paste localhost in the browsers address bar.
This will open the index.html file in the www directory, and display it in your
browser.
Test your Apache Server: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Network Configuration | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
You will want to manually configure a static IP address
on the computer hosting your server. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Password Protecting Directories Hosted by Apache Server | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
There is a simple way to password protect folders in your Apache
Server Hosted Directory. Creating an .htaccess file: AuthName "Log In" AuthName is the Message the User Name and
Password "Window" will display when asking users to log in. Creating the .htpasswd file:
Open "Terminal" in Ubuntu. htpasswd -c /etc/apache2/.htpasswd UserName For example to create a New .htpasswd file (the .htpasswd right before steve is the file name you are creating, which can be changed), with the initial/first user name entry of scott, you would enter: htpasswd -c /etc/apache2/.htpasswd scott Syntax: htpasswd optionalswitch path&filename username Adding log ins to the .htpasswd file:
To ADD an additional log in to an existing .htpasswd file in the apache2
folder/directory (Notice the -c is NOT USED to add log ins): htpasswd /etc/apache2/.htpasswd UserName Place the .htaccess file
in the directory you wish to password protect with a path to the .htpasswd file. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Test Apache for PHP Support | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Testing Apache for PHP Support: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Apache Server Configuration | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
The main configuration file located at /etc/apache2/apche2.conf in Windows, is
located at /etc/apache2/sites-enabled/000-default in Ubuntu.
All Apache configuration files in Ubuntu are located at: /etc/apache2
Document Root:
Port:
NameVirtualHost *:80
NameVirtualHost *:78 sudo gedit /etc/apache2/sites-enabled/000-default Look for the following line: <VirtualHost *:80> Replace with the following line (Change 80 to 78):
<VirtualHost *:78>
PHP Configuration: etc/php5/apache2/php.ini The path to PHP sendmail is: /usr/lib/sendmail |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Enabling Apache Modules | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
If you want to enable some Apache modules (SSL, rewrite, suexec, and include) |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Additional Reading | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Apache Server for Linux/Ubuntu 1 |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Other Cool Additions to Consider | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Additional Packages to Consider (Synaptics Package Manager):
libapache2-mod-perl2 (Pearl) Mail Server IMAP/POP3: Spam Filtering: Browser Based Mail Interface:
FTP Servers:
Configuration / Control Panel:
Security:
Blogging:
Wiki:
Photo Sharing:
Web Site Builders:
Social Networking / ePortfolio:
Other:
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Other Web Servers Compatible with Ubuntu - Apache alternatives | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cherokee (GUI controlled web server) Groupware Servers: |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Other Related Topics of Interest | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
Ubuntu
Install and Set Up Guide Guide to setting up Networks & Wireless Networks Get Help in the Ubuntu Classroom - IRC Chat Room |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright © 2008 http://www.bestyoucanget.com All Rights Reserved See Terms of Use | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||