# Apache help



## vampyr2005 (Mar 15, 2005)

I tried to create virtual hosts in my apache server so that I could use my subdomains as they are different sites that I maintain for diff reasons .... my main site which runs off my domain name just keeps pointing me to the apache page that says you need to add your webpage to the directory .... and my subdomains take me to my modem admin page while they take others to the apache page that the domain name takes me to .... 

can anybody help me ??

http://www.re-vamp.net -- domain name

http://www.vampyrus.re-vamp.net -- subdomain number one.

http://www.moomouse.re-vamp.net -- subdomain number 2.


----------



## Skie (Mar 15, 2003)

Are you using Windows or Linux for the server? Can you post your VirtualHosts sections?

Also, I get a page under construction message when I visit your links (for all of them).


----------



## vampyr2005 (Mar 15, 2005)

thats a good thing I think lol .. it means that outside people can at least access the server ... whenever I try to access it from my own computer via the web address it sends me to my modem's admin login page, do u know why it does this ?? 



NameVirtualHost www.re-vamp.net
<VirtualHost www.re-vamp.net>
ServerAdmin [email protected]
DocumentRoot "K:/Apache/Apache2/htdocs/re-vamp/"
ServerName www.re-vamp.net
</VirtualHost>

NameVirtualHost www.vampyrus.re-vamp.net
<VirtualHost www.vampyrus.re-vamp.net>
ServerAdmin [email protected]
DocumentRoot "K:/Apache/Apache2/htdocs/vampyrus/"
ServerName www.vampyrus.re-vamp.net
</VirtualHost>

NameVirtualHost www.moomouse.re-vamp.net
<VirtualHost www.moomouse.re-vamp.net>
ServerAdmin [email protected]
DocumentRoot "K:/Apache/Apache2/htdocs/moomouse/"
ServerName www.moomouse.re-vamp.net
</VirtualHost>


----------



## Skie (Mar 15, 2003)

vampyr2005 said:


> thats a good thing I think lol .. it means that outside people can at least access the server ... whenever I try to access it from my own computer via the web address it sends me to my modem's admin login page, do u know why it does this ??
> 
> 
> 
> ...


Everything looks in order. Can you modify the 3 index pages to look a bit different? I'll check each to make sure that they're working right. Right now, I can't tell for sure if they're displaying different index pages. 

As far as you viewing your modem's admin page, how are you set up? computers, network, routers, firewalls, etc. What's plugged into what? Is apache on a different server then the one you're using?


----------



## vampyr2005 (Mar 15, 2005)

I am using the same computer that apache is installed on ... this computer is attached directly to a 'netcomm nb5 modem router' which is configured to allow network access as well as having port forward rules set for webservers .... however I actually currently have the modems inbuilt firewall switched off ... it tends to give me a bit more grief than it's worth when i'm trying to play some of my games online  
the http://www.vampyrus.re-vamp.net link should give you this site: http://www.vampyr2005.bravehost.com 
the moomouse site is currently not completely finished and the re-vamp.net domain name site is also still currently undergoing construction.


----------



## vampyr2005 (Mar 15, 2005)

now I find a strange thing happening, if I try to access the links I posted in here from the other computer on my network I get 'page cannot be displayed' errors.


----------



## Skie (Mar 15, 2003)

I'm noticing this too at the moment. Make sure that Apache is still running and that you didn't accidentally turn on the firewall and block port 80. You might want to edit your hosts file to point your local IP to the domain name.


----------



## vampyr2005 (Mar 15, 2005)

can u tell me how i would edit the hosts file pls? 
I dont know how to ... and I know for a fact that the firewall is not switched on because it requires navigating to a page that I never go to in order to do it ...


----------



## Skie (Mar 15, 2003)

What version of Windows do you have?


----------



## vampyr2005 (Mar 15, 2005)

windows xp professional with sp2.


----------



## DumberDrummer (Oct 27, 2003)

Look in C:\windows\system32\drivers\etc

Add a line in the hosts file (You will need to right click on it and goto "Open with" and select notepad or wordpad) that looks like this:

127.0.0.1 www.re-vamp.net

This will solve the problem, hopefully. 

alternately, you could just use localhost instead of the domain name.


----------



## vampyr2005 (Mar 15, 2005)

that helped a little bit ... now when I use the host computer to navigate to either http://localhost or the domain or either of the subdomains I actually get the index page of mt completed site which is meant to reside under the subdomain www.vampyrus.re-vamp.net

this is not meant to be the main page that shows up when the domain name http://www.re-vamp.net is typed into the browser. that link is supposed to lead to a webpage that tells the viewer that the page is currently under construction. Does anyone have any idea why these pages are not showing up in their correct places ?? The other problem is that although I am able to navigate to these pages on my host computer, others on the actual www are still unable to view these pages or sites ...

okay now I have just changed the httpd.conf file to include a virtual host container for my main site and now my local computer directs all 3 domains/subdomains to the "page under construction" index page that the main domain name shoud be linking to ... for some reason it isnt redirecting the other sites to their correct pages ...

please check the attachments below to see the various error messages that I have been getting:


----------



## Skie (Mar 15, 2003)

Please post your VirtualHost section again, as well as the NameVirtualHost lines.


----------



## vampyr2005 (Mar 15, 2005)

I am using an Apache GUI interface program called ApacheConf to interface with my Apache server and it supposedly makes everything easier. I was originally doing everything manually and using just the standard apache services monitor to start/stop the server.

these are situated on lines 140-143.
NameVirtualHost *:80
NameVirtualHost *:80
NameVirtualHost *:80
NameVirtualHost *:80

these are situated on lines 837-859
<VirtualHost *:80>
ServerName www.re-vamp.net
DirectoryIndex index.html index.htm
DocumentRoot "K:/Apache2/htdocs/re-vamp"
</VirtualHost>

<VirtualHost *:80>
ServerName www.vampyrus.re-vamp.net
DirectoryIndex index.html index.htm
DocumentRoot "K:/Apache2/htdocs/vampyrus"
</VirtualHost>

<VirtualHost *:80>
ServerName www.moomouse.re-vamp.net
DirectoryIndex index.html index.htm
DocumentRoot "K:/Apache2/htdocs/moomouse"
</VirtualHost>

<VirtualHost *:80>
ServerName www.moomousepics.re-vamp.net
DirectoryIndex index.html index.htm
DocumentRoot "K:/Apache2/htdocs/moomousepics"
</VirtualHost>


----------



## Skie (Mar 15, 2003)

You only need 1 NameVirtualHost line if you're going to use the *:80. If you use seperate IP addresses for each site, then you'd need 1 NameVirtualHost for each IP address. 

Also, I'm not sure if you need the ":80" for the VirtualHost lines as I don't use them. But then, I don't use an * for the IP address. Try removing the :80 and see if that helps.


----------



## vampyr2005 (Mar 15, 2005)

okay ... now I am able to access 3 of my 4 sites from my local computer using the actual web address ... but the 4th site comes up with an unable to find the server page ... and when I try to access the sites from a remote computer I get a login page for sumthing ... the address for this page is as follows: 
http://www.vampyrus.re-vamp.net/cgi-bin/webcm
and 
http://www.moomouse.re-vamp.net/cgi-bin/webcm

do you know what this page is meant to be ??


----------



## Skie (Mar 15, 2003)

Check your html files that you have within the DocumentRoot folders. It appears as if you're redirecting to a CGI script. I'm not sure what that script is however.


----------



## vampyr2005 (Mar 15, 2005)

I haven't put any cgi scripts into my html documents as I don't know how to use them .... and I have cjecked the folders and cannot find any instances of anything that has cgi in its name ...


----------



## Skie (Mar 15, 2003)

What about your HTML files? See if you're using a redirect in one of them. Or check to see if you have a .htaccess file.


----------



## vampyr2005 (Mar 15, 2005)

I cannot find any files named ".htaccess" and yes i do have some redirects in my webpages, however they redirect to other pages inside my site and i know for a fact that they redirect correctly as i have had the site online and had them checked ....


----------

