Forum Moderators: travelin cat

Message Too Old, No Replies

Problem with my domain, and ISP ID being shown as URL

         

simondavis

1:45 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



Hi,

I do apologise if this is a well discussed problem, but I'm not even sure how to describe it, so searching is tricky! I have also posted this at another tek website, but it's very slow.

Anyhow, I am (new to) using my Mac as a webserver, and appear to have the site up and running OK, but I have a strange and irritating problem. I'm fairly new to OSX too, so please be gentle.

The problem is; When I go to my website from a browser, it is OK. The URL shown in the broswer is [mydomain.com...]

If I click a link on that page, it is also OK, the URL is shown as [mydomain.com...]

But, if I have a subdirectory with just an index page, and go to that, whether directly or through a link (ie, I just type or click [mydomain.com...] the ID of my ISP appears in the URL, and stays there.

So, instead of the url in the browser being [mydomain.com...] it shows [11111.rjo.virtua.com.br...] - Virtua being my ISP. This ID stays shown for all subsequent pages I load.

The site works fine, but obviously I don't want this happening.

The DNS records for my site are all OK, I have been running it on a Windows server, with no problems.

On the Mac, after various faltering tweaks on the Apache config file, I have set everything back to default, and am just working with one domain.

Any ideas? All I have really done is set websharing to on. Everything else is more or less default, although I have installed mySQL and activated php, both of which work OK too. I doubt that makes a difference.

This is OSX 10.3.5, darwin kernel 7.5.1, Single G5 powermac, DSL 600/600 with fixed IP

Thanks for your help.

simondavis

3:21 pm on Feb 8, 2005 (gmt 0)

10+ Year Member



OK, update. I have half solved this problem, but I have another which seeing as you're here, maybe you could take a look at?

The solution, which I don't understand, was to put the server as a virtualhost in the Apache httpd.conf file.

However, I did that because I actually have 2 domains, and would have needed to set this up anyway.

So, the site works, but the problem now is that I have 2 virtualhost entries in the httpd.conf file, but the browser goes to the content of just the first virtual server specified - if I put domain1 first in the conf file, and domain 2 second, any requests for either of them go to domain 1, and vice versa.

It's obviously a prob with the httpd.conf file, could anyone tell me if this looks wrong?

NameVirtualHost *

<VirtualHost www.domain1.com:80>
DocumentRoot /library/webserver/domain1
ServerName www.domain1.com
</VirtualHost>

<VirtualHost www.domain2.com:80>
DocumentRoot /library/webserver/domain2
ServerName www.domain2.com
</VirtualHost>

Only the first one works - if I switch the positions, it will serve domain2 up . . .

Thanks for reading!

whoisgregg

9:48 am on Feb 16, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'd recommend posting this in the Apache forum, as your issue isn't specific to the mac. :)
[webmasterworld.com...]