RSS Subscription
Linux Howtos & Tutorials

Enter your email:

Delivered by


NOTE:New tutorials are from LinuxCareer.com

Poll

Do you own or wish to have iPhone?
 


Linux eBooks FREE Download
A guide to programming Linux kernel modules
Introduction to Linux - A Hands on Guide
A Newbie's Getting Started Guide to Linux

Linux from Scratch - Create Your Own Linux System - Free eBook

Linux: The Hacking Solution (v.3.0)

SQLite 3 with PHP Essential Training – Free Video Training Tutorials

This guide will introduce you to the world of GNU/Linux

The GNU/Linux Advanced Administration

A Complete Beginner's Manual for Ubuntu 10.04 (Lucid Lynx)

Advanced Bash-Scripting Guide

Set up, maintain, and secure a small office email server

Partner Linux Sites:
How-To.LinuxCareer.com
Jobs.LinuxCareer.com
TuxMachines
Monsterb
LinuxBloggers
AdamsInfo
LinuxScrew
All For Linux

Configure Apache VirtualHost on Fedora

If you decided to run more than one website on your Apache web server you would need to configure a VirtualHost based on the name or IP address. Here is some notes on how to achieve it. Here we assume that you have httpd package already installed on your system.

Step 1:

Create a directory to contain your new website:

# mkdir /var/www/example.net
# echo Hello Web > /var/www/example.net/index.html
# chmod -R 755 /var/www/example.net
# chown -R apache.apache /var/www/example.net

Step 2:

Add virtual host configuration to the bottom of /etc/httpd/conf/httpd.conf :

<VirtualHost *:80>
DocumentRoot /var/www/example.net
ServerName www.example.net
# Other Apache config directives, logs etc.
</VirtualHost>

Step 3:

Confirm the VirtualHost sytax before restarting httpd service:

# httpd -S

Step 4:

Restart apache :

# /etc/init.d/httpd restart

Step 5:

If your example domain is already pointing to your server you should be ready to go. Make sure that your domain resolves an IP address of your server. For testing it is also handy to modify /etc/hosts file. For example if this is done just locally add :

# echo 127.0.0.1 www.example.net example.net >> /etc/hosts

Or if your web server’s IP is 222.222.22.2 do to access it from your local client:

# echo 222.222.22.2 www.example.net example.net >> /etc/hosts

For anything else you need Domain name record somewhere.

Step 6:

Navigate to your new VirtualHost website.

Share this linux post:

Submit Configure Apache VirtualHost on Fedora in Delicious Submit Configure Apache VirtualHost on Fedora in Digg Submit Configure Apache VirtualHost on Fedora in FaceBook Submit Configure Apache VirtualHost on Fedora in Google Bookmarks Submit Configure Apache VirtualHost on Fedora in Stumbleupon Submit Configure Apache VirtualHost on Fedora in Technorati Submit Configure Apache VirtualHost on Fedora in Twitter
 
Comments for this page are closed !!!
Please visit our new Linux Forum for additional help or discussion.


Linux eBooks FREE Download