Jump to content

really lost with a virtual hosts & IP & DNS problem...


obviously

Recommended Posts

Hi,

 

First I apologize for my bad english, i will do my best...

So my head will explode on a stupid problem if you don't help me...

 

The context:

- 1 apache server located as xxx.xxx.xxx.xxx

- I have a domain name mysite.com (LWS registar) configured like this:

          Zone A: *.mysite.com xxx.xxx.xxx.xxx

- I use https and sub-domains (for member.mysite.com, etc.)

- when I access to anysubdomain.mysite.com all is fine

 

Now the problem:

 

When the url is www.mysite.com or mysite.com the adress bar contain correct url but javascript and php redirections don't work correctly:

All new requests are corrects but address bar don't change and if it's an https connexion (like payment.mysite.com) no lock at bottom of the page, and the address bar contain www.mysite.fr...

 

Tested on many browers, so I've tried to do a vhost redirection from *.mysite.com to asubdomain.mysite.com (I know this is really not fine) and this redirection do exactly the same things as js and php redirections (adress bar don't change, etc...)

 

So I think it's a registar DNS configuration problem but where is my error ?

 

I've certainly made a big mistake somewhere...

 

If this can be usefull, virtualhosts are configured like this:

NameVirtualHost      xxx.xxx.xxx.xxx:80
NameVirtualHost      xxx.xxx.xxx.xxx:443

<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName *.mysite.com
    Redirect / http://public.mysite.com/
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:80>
    ServerName public.mysite.com
    DocumentRoot ...
</VirtualHost>

<VirtualHost xxx.xxx.xxx.xxx:443>
    ServerName payment.mysite.com
    DocumentRoot ...
   # SSL conf
   ...
</VirtualHost>

 

Please show me the reactivity of this forum, I've just discovered it, it seems really nice and I'm really lost with this problem...

 

A sincere thank to any reader and for any suggestion...

Link to comment
Share on other sites

Ok I've found my mistake: DNS zones configuration can't be used concerning www.thesite.com or thesite.com, so my registar config (Zone A *.mysite.com xxx.xxx.xxx.xxx) was not applied on this 2 urls...

 

Therefore I found a redirection configuration page where link to my server was transparent, I've set this thing to physical with the server IP. (Not usefull to say that I'm a newbie in DNS configuration...)

 

Now all PHP and js redirect fine on www.mysite.com and mysite.com but I have another problem:

 

when I use www.mysite.com or mysite.com adress bar like server name is equal to my server  IP...

So for sessions conservation (configured for *.mysite.com in php for multi sub-domain) I've to add an apache vhost redirection to anysubd.mysite.com if server_name = xxx.xxx.xxx.xxx else sessions are not aviable...

 

It's a very bad solution so if someone have something better... thanks.

 

Best regards, obviously.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.