Page 1 of 1

Virtualhost problems (not localhost)

PostPosted: 17. February 2013 05:47
by mccarthyp64
Hi,
My virtualhosts keeps on flaking out on me.
I have a dyndns setup for my domain and have subdomains which I would like to use.
I need "forum.trgperth.tk", "bans.trgperth.tk", "www.trgperth.tk" and "trgperth.tk" (it has a .htaccess that redirects to www.trgperth.tk).
My vhosts.conf:
Code: Select all
NameVirtualHost *:80
<VirtualHost *:80>
    DocumentRoot "C:/xampp/htdocs"
    ServerName "trgperth.tk"
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/www"
    ServerName "www.trgperth.tk"
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/forum"
    ServerName "forum.trgperth.tk"
</VirtualHost>
<VirtualHost *:80>
    DocumentRoot "C:/xampp/bans"
    ServerName "bans.trgperth.tk"
</VirtualHost>

Any help would be appreciated.

Re: Virtualhost problems (not localhost)

PostPosted: 18. February 2013 17:51
by JonB
Please to help us:

What is 'flaking out', exactly??

Is that a new error message? :shock:

You have to be specific for us to assist you...

Good Luck
8)

Re: Virtualhost problems (not localhost)

PostPosted: 23. February 2013 06:52
by mccarthyp64
Any subdomain displays the "www" subdomain (which is my wordpress now).

Re: Virtualhost problems (not localhost)

PostPosted: 23. February 2013 13:58
by Nobbie
mccarthyp64 wrote:Any subdomain displays the "www" subdomain (which is my wordpress now).


Subdomains cannot "display" anything, so would you please be more precisely what is going wrong on your Server?! It is definately impossible to give any hints on that poor information.

Re: Virtualhost problems (not localhost)

PostPosted: 24. February 2013 02:22
by mccarthyp64
Let me try again. If I go onto bans.trgperth.tk, and it comes up with the wordpress (www.trgperth.tk) site contained in C:/xampp/htdocs/. Same thing happens with forum.trgperth.tk.

Re: Virtualhost problems (not localhost)

PostPosted: 02. March 2013 01:56
by mccarthyp64
bump

Re: Virtualhost problems (not localhost)

PostPosted: 02. March 2013 07:11
by Altrea
Hi mccarthyp64,

Your VHosts definitions are working correctly on my testenvironment (after adding some Apache access rules).
Do you have restarted Apache after changing any configuration files?
Can you show us your \xampp\apache\logs\error.log and \xampp\apache\logs\access.log (especially the entrys with the not working requests)?
Are your DynDNS Entrys configured properly?

best wishes,
Altrea

Re: Virtualhost problems (not localhost)

PostPosted: 04. March 2013 13:30
by mccarthyp64
access rules you say...

Re: Virtualhost problems (not localhost)

PostPosted: 04. March 2013 16:02
by Altrea
mccarthyp64 wrote:access rules you say...

The access rules are not your problem. The effect of wrong / missing access rules would be that you would get a http status error 403 page and not that a different access rule will take effect.

Re: Virtualhost problems (not localhost)

PostPosted: 06. March 2013 13:04
by mccarthyp64
For "forum.trgperth.tk", here is the access.log snippet:
Code: Select all
xxx.xxx.xxx.xxx - - [06/Mar/2013:20:02:51 +0800] "GET / HTTP/1.1" 200 7566 "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"
xxx.xxx.xxx.xxx - - [06/Mar/2013:20:02:53 +0800] "GET /favicon.ico HTTP/1.1" 200 - "-" "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.22 (KHTML, like Gecko) Chrome/25.0.1364.152 Safari/537.22"


No changes in error.log

Re: Virtualhost problems (not localhost)

PostPosted: 06. March 2013 16:09
by Altrea
Sorry. I can't identify the problem.
Your vhost configuration is working on my test environment so I guess the problem has something to do with your DynDNS configuration.

Re: Virtualhost problems (not localhost)

PostPosted: 06. March 2013 17:22
by Nobbie
I am pretty shure that vhost.conf is not included in httpd.conf