Apache2Triad Help, Support and Development Forum Index Search Profile Log in to check your private messages Log in Register Memberlist Attachments Statistics Crew/Ranks Archive
 Virtual Hosts Not working right. Can't find answer anywhere.
Google
Post new topic Reply to topic
Author Message
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Sun Aug 28, 2005 1:23 am Reply with quoteBack to top

Ok I'm hosting two sites off my apache server the virtual host I have set up works but when I connect to my original site the one thats not set up in teh virtual host section I only get whats in my virtual host website. Is there something wronge?

Um my httpd.conf is attached for you to look at to see if i have anything wrong.
View user's profileSend private messageSend e-mailAIM Address
Twirp
 
 


Joined: 07 May 2005
Posts: 14
Location: Md

PostPosted: Sun Aug 28, 2005 1:36 am Reply with quoteBack to top

change:

NameVirtualHost teamvietnam.hopto.org:80

to:

NameVirtualHost *:80

Change:

<VirtualHost teamvietnam.hopto.org:80>

to:

<VirtualHost *:80>
View user's profileSend private messageAIM AddressYahoo MessengerMSN Messenger
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Sun Aug 28, 2005 1:46 am Reply with quoteBack to top

nope it didn't work. And with it like that I cna't access the apache2triadcp.

It still does the same thing.
View user's profileSend private messageSend e-mailAIM Address
bigredcherokee
 
 


Joined: 27 Aug 2005
Posts: 13
Location: Shreveport, Louisiana

PostPosted: Sun Aug 28, 2005 2:45 am Reply with quoteBack to top

same problem I'am having
View user's profileSend private messageYahoo Messenger
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Sun Aug 28, 2005 11:31 pm Reply with quoteBack to top

ok I've found a nifty way to fix my problem. I have though no-ip.com and there dns lookup program thing and option to have my server name look to my server under another port other than port 80. I have each webpage assigned a different port so that it does not load only one of the pages I'm host no matter what address I go to. Its call port redirect under the no-ip settings. I have one site as port 80 and the other one port 81.
View user's profileSend private messageSend e-mailAIM Address
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Mon Aug 29, 2005 1:11 am Reply with quoteBack to top

bigredcherokee

You need a virtual host for each sitename see:
http://apache2triad.net/forums/viewtopic.php?t=21
or
http://jaydium.servehttp.com/forum_viewtopic.php?13.32
View user's profileSend private messageYahoo MessengerICQ Number
soulzllc
 
 


Joined: 20 Aug 2005
Posts: 12
Location: CT

PostPosted: Tue Aug 30, 2005 12:29 am Reply with quoteBack to top

Existing:
Code:

<VirtualHost teamvietnam.hopto.org:80>
ServerAdmin wrsaith@gmail.com
DocumentRoot "C:\apache2triad\htdocs\cs"
ServerName teamvietnam.hopto.org
ServerAlias teamvietnam.hopto.org
ErrorLog logs/teamvietnam.hopto.org-error_log
CustomLog logs/teamvietnam.hopto.org-access_log common
</VirtualHost>


Try:
Code:

<VirtualHost 127.0.0.1> #or your real ip
    ServerAdmin wrsaith@gmail.com
    DocumentRoot htdocs/cs
    ServerName  teamvietnam.hopto.org
    ServerAlias  teamvietnam.hopto.org
    DirectoryIndex index.htm index.html index.php index.shtml index.asp index.cgi index.php3
    ErrorLog C:/apache2triad/logs/teamvietnam.hopto.org-error.log
    CustomLog C:/apache2triad/logs/teamvietnam.hopto.org-access.log combined
</VirtualHost>


Also put your IP back into the NameVirtualHost but remove the :80 to define the port..

something else I noticed:
Code:

#server config
ServerName localhost:80
ServerAdmin wrsaith@gmail.com

change
ServerName localhost:80
to
ServerName teamvietnam.hopto.org:80

if you want your site avaliable online.
View user's profileSend private messageAIM AddressYahoo Messenger
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Tue Aug 30, 2005 1:02 am Reply with quoteBack to top

Will thanks anyway but I have another way to do it now with no-ip.coms serverice. They have a port redirect that I'm using keeping my main site on the port 80, and put my other site on port 81. I set apache to listen on both ports and It works fine. For others who have a similar problem this might be a handy and simple way to fix your problem if your dns name hoster has the port redirect option.
View user's profileSend private messageSend e-mailAIM Address
soulzllc
 
 


Joined: 20 Aug 2005
Posts: 12
Location: CT

PostPosted: Tue Aug 30, 2005 2:50 am Reply with quoteBack to top

Code:

<VirtualHost 127.0.0.1> #or your real ip
    ServerAdmin wrsaith@gmail.com
    DocumentRoot htdocs/cs
    ServerName  teamvietnam.hopto.org
    ServerAlias  teamvietnam.hopto.org
    DirectoryIndex index.htm index.html index.php index.shtml index.asp index.cgi index.php3
    ErrorLog C:/apache2triad/logs/teamvietnam.hopto.org-error.log
    CustomLog C:/apache2triad/logs/teamvietnam.hopto.org-access.log combined
</VirtualHost>


will allow for multiple sites to be hosted via port 80..
View user's profileSend private messageAIM AddressYahoo Messenger
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Thu Sep 01, 2005 7:51 am Reply with quoteBack to top

Sorry soulzllc your way didn't work in the end after adding a third website to the list of websites I host this is what I've done to get the to run properly. Now if I don't have my main site as a virtualhost as well it won't showup/load in the browser it will just show page not found or it would show up my first virtualhost I had diffined so I gave it a vhost handler as well. Is there any forseeable problems running my server Like this?
View user's profileSend private messageSend e-mailAIM Address
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Thu Sep 01, 2005 10:47 pm Reply with quoteBack to top

You might want a localhost section:

Code:
 #site1.com
<VirtualHost *:80>
ServerAdmin admin@site1.com
documentRoot c:/apache2triad/htdocs/site1
ServerName www.site1.com
ServerAlias site1.com
ErrorLog logs/site1.com-error_log
CustomLog logs/site1.com-access_log common
</VirtualHost>

#site2.com
<VirtualHost *:80>
ServerAdmin admin@site2.com
documentRoot c:/apache2triad/htdocs/site2
ServerName www.site2.com
ServerAlias site2.com
ErrorLog logs/site2.com-error_log
CustomLog logs/site2.com-access_log common
</VirtualHost>

#localhost
<VirtualHost localhost:80>
ServerAdmin admin@localhost
documentRoot c:/apache2triad/htdocs
ServerName localhost
ErrorLog logs/localhost.com-error_log
CustomLog logs/localhost.com-access_log common
</VirtualHost>
View user's profileSend private messageYahoo MessengerICQ Number
Wrsaith
 
 


Joined: 24 Aug 2005
Posts: 19

PostPosted: Sat Sep 03, 2005 11:34 pm Reply with quoteBack to top

why would I need to put a localhost vhost in? All three pages work properly now and wouldn't the localhost not be accessable from the net. sence you'd only be able to access localhost from my machine?
View user's profileSend private messageSend e-mailAIM Address
Joshua Meadows (DemoRic)
support
support


Joined: 29 Dec 2004
Posts: 783
Location: S.E. Kansas

PostPosted: Sun Sep 04, 2005 3:16 pm Reply with quoteBack to top

You are correct localhost is only accesable from your pc.
It just helps keep logs and such clearer, I find it helpful because I can tighten the security on my websites, and loosen it for localhost.

It's nothing critical, just helpful.
View user's profileSend private messageYahoo MessengerICQ Number
Display posts from previous:      
Post new topic Reply to topic


 Jump to:   



View next topic
View previous topic
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum
Powered by phpBB © 2001, 2002 phpBB Group :: FI Theme
All times are GMT