#1  
Old 11th March 2008, 07:25
micko_escalade micko_escalade is offline
Senior Member
 
Join Date: Jan 2006
Posts: 123
Thanks: 7
Thanked 3 Times in 3 Posts
Default Apache Virtual Hosts

Howdy all,

1. Can someone please post virtual host configuration for total of 4 domains? in httpd.conf

2. where directories for virtual domains should be ?
/var/www/html/domain1.com
/var/www/html/domain2.com
etc.
?

Thanks!
Reply With Quote
Sponsored Links
  #2  
Old 11th March 2008, 11:26
Musty Musty is offline
Member
 
Join Date: Mar 2008
Location: Morocco
Posts: 38
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by micko_escalade
Howdy all,

1. Can someone please post virtual host configuration for total of 4 domains? in httpd.conf

2. where directories for virtual domains should be ?
/var/www/html/domain1.com
/var/www/html/domain2.com
etc.
?

Thanks!

<VirtualHost *:80>
DocumentRoot /var/www/html/site1_folder
ServerName domain1.com
<Directory "/var/www/html/site1_folder">
</Directory>
</VirtualHost>


<VirtualHost *:80>
DocumentRoot /var/www/html/site2_folder
ServerName domain2.com
<Directory "/var/www/html/site2_folder">
</Directory>
</VirtualHost>

Just copy and paste the directive above and change the folder and domain name accordingly for more domains.

Hope this helps
__________________
Computers are like air conditioners, they stop working properly if you open Windows.

Last edited by Musty; 11th March 2008 at 11:29.
Reply With Quote
  #3  
Old 11th March 2008, 14:11
zcworld zcworld is offline
Senior Member
 
Join Date: Jul 2006
Location: South Australia
Posts: 329
Thanks: 2
Thanked 37 Times in 37 Posts
Send a message via MSN to zcworld Send a message via Skype™ to zcworld
Default

what linux OS your using
if its an redhat /centos / fedora and i think there is an opensuse 10 ver as well

MkVhost
redhat ver : download


check this out its an simple tool that a friend made for me age ago
when i was starting out with vhost

had a s**t load of problems when i started out with setting them up right and so on


ok

i would do it like this

/var/www/vhost/<site>
/htdocs
/tmp
/logs
/cgi-bin (if needed)
__________________
Shane Ebert :: Facebok
Reply With Quote
  #4  
Old 11th March 2008, 16:00
Musty Musty is offline
Member
 
Join Date: Mar 2008
Location: Morocco
Posts: 38
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by zcworld
what linux OS your using
if its an redhat /centos / fedora and i think there is an opensuse 10 ver as well

MkVhost
redhat ver : download


check this out its an simple tool that a friend made for me age ago
when i was starting out with vhost

had a s**t load of problems when i started out with setting them up right and so on


ok

i would do it like this

/var/www/vhost/<site>
/htdocs
/tmp
/logs
/cgi-bin (if needed)
Hey czworld, How about using what I suggested?
It works fine for me. But I did download the mkvhost thing. Great tool. But, confused as I am, I'd rather stick to the easiest way, huh?

check it out here:

http://www.elkadimi.org

Cheers
__________________
Computers are like air conditioners, they stop working properly if you open Windows.
Reply With Quote
  #5  
Old 12th March 2008, 00:33
zcworld zcworld is offline
Senior Member
 
Join Date: Jul 2006
Location: South Australia
Posts: 329
Thanks: 2
Thanked 37 Times in 37 Posts
Send a message via MSN to zcworld Send a message via Skype™ to zcworld
Default

hint hint

you would never put your VHOST sites into the /var/www/html or /var/www/htdocs folder
because thats the apache DEFAULT home folder
__________________
Shane Ebert :: Facebok
Reply With Quote
  #6  
Old 12th March 2008, 06:08
micko_escalade micko_escalade is offline
Senior Member
 
Join Date: Jan 2006
Posts: 123
Thanks: 7
Thanked 3 Times in 3 Posts
Default

Thanks guys!
Reply With Quote
  #7  
Old 12th March 2008, 11:52
Musty Musty is offline
Member
 
Join Date: Mar 2008
Location: Morocco
Posts: 38
Thanks: 3
Thanked 2 Times in 2 Posts
Default

Quote:
Originally Posted by zcworld
hint hint

you would never put your VHOST sites into the /var/www/html or /var/www/htdocs folder
because thats the apache DEFAULT home folder
So what if it's the DEFAULT folder. You mean it is not safe? That somebody might guess where the web site is located? What difference does it make if it's in /var/www/html/ or in, say, /var/www/somefolder ?

Excuse my ignorance!
__________________
Computers are like air conditioners, they stop working properly if you open Windows.
Reply With Quote
  #8  
Old 12th March 2008, 13:54
zcworld zcworld is offline
Senior Member
 
Join Date: Jul 2006
Location: South Australia
Posts: 329
Thanks: 2
Thanked 37 Times in 37 Posts
Send a message via MSN to zcworld Send a message via Skype™ to zcworld
 
Default

if you got like an privte admin backend site
with like
mydns
phpmyadmin
and any other tools you use
last thing you want is anyone to find it and see if
than have access to it

and its makes it easy to do an quick backup if all of your VHOST sites are in one folder
say if you have 3 or 4 or more
__________________
Shane Ebert :: Facebok

Last edited by zcworld; 12th March 2008 at 13:57.
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't start apache Musty Server Operation 12 9th March 2008 13:58
Apache Virtual Hosts - I have never gotten this right. DazzyB Server Operation 2 24th December 2007 13:37
Problem with the installation of Dokeos (LMS) in ISPConfig jofranco General 4 28th April 2006 00:45
Apache - Virtual hosts - ISPConfig Hans Server Operation 8 23rd April 2006 16:29
apache and virtual hosts stored in postgresql variable Server Operation 3 28th December 2005 11:48


All times are GMT +2. The time now is 08:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.