LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 02-27-2003, 11:28 PM   #1
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Rep: Reputation: 30
Unhappy Virtual Hosts Help please...


Hi,

This is what i have under virtual hosts:

NameVirtualHost 192.168.2.27

<VirtualHost 192.168.2.27>
ServerName www.asappainting.com
DocumentRoot /srv/www/htdocs/asappainting/
ServerAlias asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.theclothingline.com
DocumentRoot /srv/www/htdocs/wyd/
ServerAlias theclothingline.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName bigtymers.com
DocumentRoot /srv/www/htdocs/bigtymers/
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName dropside.com
DocumentRoot /srv/www/htdocs/dropside/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName hopesandcomputers.com
DocumentRoot /srv/www/htdocs/hopesandcomputers/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

The first two are the only sites that work for some reason. Could it be that they are the only two that have real domain names?? For example www.asappainting.com is the real domain name and so is theclothingline.com for the other site.

How can i make it were those other sites/virtual hosts work too? Is there something different i need to add for theirs? They do not have domain names so when someone wants to view them they must do this in the browswer:

http://(mywanip)/dropside or /hopesandcomputers or /bigtymers

Thats what i want to be able to do...hwo would i do that?

thanks.
 
Old 02-28-2003, 02:40 PM   #2
BenCarlisle
LQ Newbie
 
Registered: Feb 2003
Distribution: RH7,RH8,Slack
Posts: 29

Rep: Reputation: 15
If you want people to get to your site by typing in the URL http://bigtymers.com, then you must register that domain name.

Just because you enter it in your Apache configuration file does not mean that the rest of the world is aware of your name selection.

HOWEVER, that being said, another option is to create virtual subdomains. That would allow you to host different web pages at various subdomains under the ones that you do have. For example, you own asappainting.com. As it turns out (assuming your registrar set you up this way - most do), you also control any branch off that. You could configure your Apache server to respond to http://dropside.asappainting.com/ or http://bigtymers.asappainting.com/.

You would do this the same way in your Apache configuration file, for example:

<VirtualHost 192.168.2.27>
ServerName dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

Users would access this VirtualHost by entering http://dropside.asappainting.com/ in the web browser.

If this doesn't fully satisfy you, you need register each domain name you want to use.

cheers
-B
 
Old 02-28-2003, 08:09 PM   #3
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
ok. That makes sense. Thanks a lot. Since i have no loop back on my MS Router(yeah, i know, but its better than my old linksys) i cannot test my urls out. For example asappainting.com or theclothingline.com...i cannot test them. I just get errors. I ask others to test them for me.

Thanks.
 
Old 02-28-2003, 08:17 PM   #4
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
Ok...made the changes.

Can you try the following to see if they work please:

www.asappainting.com
www.theclothingline.com
www.bigtymers.asappainting.com
www.dropside.asappainting.com
www.hopesandcomputers.asappainting.com

thanks. All i did was replace those w/ what i had before. Hope it works.
 
Old 02-28-2003, 08:35 PM   #5
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Yes
Definetly Yes
No
No
No

Cannot establish connections to the last 3 urls.
 
Old 02-28-2003, 10:07 PM   #6
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
Thats weird. Now does it work? This is my new Vh code:

NameVirtualHost 192.168.2.27

<VirtualHost 192.168.2.27>
ServerName www.asappainting.com
DocumentRoot /srv/www/htdocs/asappainting/
ServerAlias asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.theclothingline.com
DocumentRoot /srv/www/htdocs/wyd/
ServerAlias theclothingline.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.bigtymers.asappainting.com
DocumentRoot /srv/www/htdocs/bigtymers/
ServerAlias bigtymers.asappainting.com
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/
ServerAlias dropside.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

<VirtualHost 192.168.2.27>
ServerName www.hopesandcomputers.asappainting.com
DocumentRoot /srv/www/htdocs/hopesandcomputers/
ServerAlias hopesandcomputers.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

Last edited by vbp6us; 02-28-2003 at 10:09 PM.
 
Old 03-01-2003, 10:30 AM   #7
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
No the last three still do not work.
 
Old 03-01-2003, 01:33 PM   #8
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
doh..any suggestions? Do i need to change something on the dns side?
 
Old 03-01-2003, 10:17 PM   #9
BenCarlisle
LQ Newbie
 
Registered: Feb 2003
Distribution: RH7,RH8,Slack
Posts: 29

Rep: Reputation: 15
If I drop the WWW it works fine....

example:

bigtymers.asappainting.com works.... If you want to prefix www onto it, make sure your ServerAlias matches.

For example,

<VirtualHost 192.168.2.27>
ServerName www.bigtymers.asappainting.com
DocumentRoot /srv/www/htdocs/bigtymers/
ServerAlias www.bigtymers.asappainting.com
DirectoryIndex index.php INDEX3.html index3.htm index.shtml
</VirtualHost>


cheers,
-B
 
Old 03-02-2003, 12:36 AM   #10
Sifvion
Member
 
Registered: Jan 2002
Location: Singapore
Distribution: Slackware
Posts: 250

Rep: Reputation: 30
remove WWW for the subdomain. Subdomain dont have WWW
 
Old 03-02-2003, 12:50 PM   #11
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
now do they work both ways?
 
Old 03-02-2003, 04:22 PM   #12
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
*bump* Sorry i really need to know. Time is a factor.
 
Old 03-02-2003, 04:25 PM   #13
Crashed_Again
Senior Member
 
Registered: Dec 2002
Location: Atlantic City, NJ
Distribution: Ubuntu & Arch
Posts: 3,503

Rep: Reputation: 57
Yes it works but without the www. You must go to hopesandcomputers.asappainting.com etc.. for it to work.
 
Old 03-03-2003, 01:18 PM   #14
vbp6us
Member
 
Registered: Sep 2002
Location: Redding, CA
Distribution: SuSE
Posts: 253

Original Poster
Rep: Reputation: 30
Ok..it works. Im not at home so testing out the urls should work and they do. The problem I see is that it's loading www.asappainting.com site instead of going into the folder i specified for each subdomain name. Ex:

<VirtualHost 192.168.2.27>
ServerName www.dropside.asappainting.com
DocumentRoot /srv/www/htdocs/dropside/ <-----------
ServerAlias www.dropside.asappainting.com
DirectoryIndex index.php index.html index.htm index.shtml
</VirtualHost>

BTW, which "www" do i drop for it to work as www.dropside.asappainting.com??

ALSO, i have the following in my ip address settings in zoneedit.com:

asappainting.com
bigtymers.asappainting.com
dropside.asappainting.com hopesandcomputers.asappainting.com
www.asappainting.com

are those right?

Basically, right now its going to asappainting.com's folder and getting the index.html + all other files from there. Please help me fix this.

Thank you.
 
Old 07-10-2003, 10:19 PM   #15
Buttercups
Member
 
Registered: Jul 2002
Location: Malaysia
Distribution: RH
Posts: 42

Rep: Reputation: 15
finally.. i thot i was the only one with the www and no www problem. cud it possibly my dns settings?

Last edited by Buttercups; 07-10-2003 at 10:43 PM.
 
  


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



Similar Threads
Thread Thread Starter Forum Replies Last Post
vsftpd, web uploads, vsftpd virtual users, apache virtual hosts, home directories jerryasher Linux - Software 7 02-18-2007 06:29 AM
virtual hosts, virtual ip's? kuplo Linux - Newbie 3 11-29-2005 08:44 PM
Help with Virtual Hosts? econnections Linux - Newbie 3 07-02-2005 12:39 PM
Virtual hosts Help carminejg3 Linux - Newbie 2 12-22-2004 02:47 PM
virtual hosts... Digital_Err0r Linux - Newbie 25 03-25-2004 03:58 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 03:33 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
Open Source Consulting | Domain Registration