|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| ||||||||||||||||||||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
||||
|
||||
|
Hello I have multiple Domain.
like www.test.com www.abcTest.com www.xyzTest.com All have same Virtual Host Entry.. just created alias. <VirtualHost *:80> ServerAdmin xyz@localhost DocumentRoot /home/xyz/web/www.test.com ServerName www.test.com ServerAlias www.abcTest.com www.xyzTest.com php_value session.cookie_domain "www.test.com" php_flag track_vars "On" php_flag register_globals "On" php_flag session.auto_start "On" </VirtualHost> In this case Session is working fine in "www.test.com" but it is not wokring for www.abcTest.com, www.xyzTest.com Can anyone have an idea? what change is required? I want to make session globally for all domain.
__________________
I will try my best !!!
Last edited by web_developer : October 30th, 2009 at 12:25 AM. |
|
#2
|
|||||
|
|||||
|
You can't share cookies across domains. There are workarounds however. The most common is that your primary domain creates a web page that includes links to your other domains. Those links include information for the other domains to let them set a cookie too.
So, in your example, once you've logged in and created a session in "www.test.com", that page has an img tag that looks something like: html4strict Code:
When the domain abctest.com gets the request it knows that the sessionId URL parameter is from test.com and it generates a cookie too. Because these are really shared domains you can then manage sessions on the back end with the multiple cookies. Note that this isn't the prettiest setup in the world. It requires that all of the domains participating access data from each other. What is your ultimate goal? Is this just a single signon across multiple domains? Or is it something else?
__________________
Need Java help? Want to help people who do? Sit down with a cup of Java at the hotjoe forums. Last edited by stdunbar : October 30th, 2009 at 11:18 AM. |
![]() |
| Viewing: Dev Shed Forums > System Administration > Apache Development > How to manage session in multiple Domain? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|