obviously Posted January 30, 2009 Share Posted January 30, 2009 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... Quote Link to comment https://forums.phpfreaks.com/topic/143079-really-lost-with-a-virtual-hosts-ip-dns-problem/ Share on other sites More sharing options...
obviously Posted January 30, 2009 Author Share Posted January 30, 2009 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. Quote Link to comment https://forums.phpfreaks.com/topic/143079-really-lost-with-a-virtual-hosts-ip-dns-problem/#findComment-750869 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.