LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-06-2003, 11:43 PM   #1
maxboost
Member
 
Registered: Sep 2003
Distribution: Centos 3.4
Posts: 35

Rep: Reputation: 15
#<VirtualHost *> ??? linux 9 help


please help,
i like to add another domain to my server and to do so are these the right steps ? and if not , please post the right way to do so.

note:
sharing same IP

1) make new folder to store htdoc files, lets call this "www2"

2) edit " httpd.conf " from
Quote:
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www1/
# ServerName apartment107.net
# ErrorLog logs/apartment107.net-error_log
# CustomLog logs/apartment107.net-access_log common
#</VirtualHost>
to

Quote:
<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www1/
# ServerName apartment107.net
# ErrorLog logs/apartment107.net-error_log
# CustomLog logs/apartment107.net-access_log commoncommon
#</VirtualHost>

<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www2/
# ServerName other domain.net
# ErrorLog logs/other domain.net-error_log
# CustomLog logs/other domain-access_log commoncommon
#</VirtualHost>

is this it ?
 
Old 11-07-2003, 12:05 AM   #2
Robert0380
LQ Guru
 
Registered: Apr 2002
Location: Atlanta
Distribution: Gentoo
Posts: 1,280

Rep: Reputation: 47
to do this, 1st you will need the line:

NameVirtualHost 192.168.1.1 << change IP to suit you

then:
<VituralHost *>
stuff here
</VirtualHost>

that 1st line is REQUIRED in order to use the same IP for differnet domain names.

Also: there must be an entry in the DNS server for each host, i.e. the hostname must resolve to the IP otherwise the request will never make it to the webserver.
 
Old 11-07-2003, 08:21 PM   #3
maxboost
Member
 
Registered: Sep 2003
Distribution: Centos 3.4
Posts: 35

Original Poster
Rep: Reputation: 15
so what your saying is
it should look like this

Quote:
#<VirtualHost *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www1/
# ServerName apartment107.net
# ErrorLog logs/apartment107.net-error_log
# CustomLog logs/apartment107.net-access_log common
#</VirtualHost>
to

Quote:
< VirtualHost 192.168.1.1 *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www1/
# ServerName apartment107.net
# ErrorLog logs/apartment107.net-error_log
# CustomLog logs/apartment107.net-access_log commoncommon
#</VirtualHost>

< VirtualHost 192.168.1.1 *>
# ServerAdmin webmaster@dummy-host.example.com
# DocumentRoot /www2/
# ServerName other domain.net
# ErrorLog logs/other domain.net-error_log
# CustomLog logs/other domain-access_log commoncommon
#</VirtualHost>

is this it ?
 
  


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
virtualhost behind NAT treotan Linux - Networking 2 08-05-2004 10:14 AM
VirtualHost amdathlonboy Linux - Networking 2 06-22-2004 05:23 AM
<VirtualHost> problemes freelinuxcpp Debian 4 01-06-2004 08:52 AM
Help with Apache <VirtualHost> please. smakkythecamel Linux - Networking 2 06-12-2003 07:15 PM
setting virtualhost without IP acid_kewpie Linux - Networking 3 12-10-2002 07:45 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:17 PM.

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
Open Source Consulting | Domain Registration