LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2004, 10:10 AM   #1
chimp
LQ Newbie
 
Registered: Nov 2004
Location: UK
Distribution: Mandrake 10.1
Posts: 10

Rep: Reputation: 0
Question Apache Configuration


I am an experienced Windows user who is just starting out with Mandrake 10.1. I am using my machine for development and am looking for some pointers in setting up Apache for this purpose.

I would like to create several test web sites just for internal use on my machine i.e. no connections from outside. I want to be able to create a new directory e.g. /home/html and a subdirectory for each web site e.g. /home/html/site1, /home/html/site2 and so on...

In IIS I would just create a new Virtual Directory pointed at the relevant folder and away I go. How can I achieve the same in Apache? From what I have seen so far I guess it involves setting up Virtual Hosts in the /etc/httpd/conf/vhosts/Vhosts.conf file? Any pointers on the simplest way to do this are appreciated.
 
Old 12-12-2004, 10:23 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
you shouldn't keep general websites in /home (although i will admit the conventions have changed a fair bit), you should keep stuff like that in /var/www/<sitename> for example. if you want to have example.com/site1, example.com/site2 then you'd just add aliases to your default virtualhost declaration. e.g.
Code:
<virtualhost *>
        ServerName example.com
        ServerAlias www.example.com
        DocumentRoot /var/www/example/
        DirectoryIndex index.php index.html index.htm index.shtml
        LogLevel debug
        HostNameLookups off 

        Alias /music "/var/mp3"   
        Alias /wemail "/var/www/webmail"     
        
</VirtualHost>
 
Old 12-13-2004, 06:11 PM   #3
chimp
LQ Newbie
 
Registered: Nov 2004
Location: UK
Distribution: Mandrake 10.1
Posts: 10

Original Poster
Rep: Reputation: 0
Thanks for your very quick response. In the end I achieved the effect I wanted by creating subdirectories under /var/www/html. I will experiment with the settings provided above and others to as I'm sure this will offer more options and flexibility.

Cheers.
 
Old 12-14-2004, 06:24 PM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974Reputation: 1974
well yeah that will have the same effect, but then you can just plain have subdirectories in IIS anyway so i assumed you were after something a little more "virtual"
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache configuration BoardinBum Linux - Networking 3 12-29-2004 06:53 AM
Apache Configuration dramous Linux - Newbie 5 09-27-2004 03:46 PM
apache configuration? jcsg Linux - Newbie 1 06-21-2004 08:08 AM
Apache configuration? sikandar Linux - Software 2 10-21-2003 01:54 PM
Apache configuration arraman Linux - Software 1 07-19-2001 01:56 AM


All times are GMT -5. The time now is 06:23 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration