LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 11-11-2004, 10:47 AM   #1
gn_linux
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Rep: Reputation: 0
Question How do u get two web servers to share same session??


How do u get two web servers to share same session??

any ideas?
 
Old 11-11-2004, 10:50 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
what webservers? apache? iis? thttpd? zeus? any chance of some useful information about your aims?
 
Old 09-01-2005, 06:30 PM   #3
gn_linux
LQ Newbie
 
Registered: Nov 2004
Posts: 2

Original Poster
Rep: Reputation: 0
apache 2!
 
Old 09-01-2005, 07:03 PM   #4
tonyfreeman
Member
 
Registered: Sep 2003
Location: Fort worth, TX
Distribution: Debian testing 64bit at home, EL5 32/64bit at work.
Posts: 196

Rep: Reputation: 30
You Dont ... use virtual hosts

You don't! I'm guessing that you have several domain names and want to have several web sites be served from your one computer. You do this by adding virtual host entries. Apache 2 has a special place already set up for these virtual hosts to be defined.

Have a look in /etc/apache2/

You should see 'sites-available' and 'sites-active' directories. Go into the 'sites-available' directory and place your virtual host entries in there .... one virtual host entry per domain that you own. You can also define various intrAnets that you want to serve internally to your own comptuers.

Here is an example of an intranet virtual host; however, the same code will apply for your domain:

Code:
<VirtualHost *>
        ServerName intranet.xxxxxxxxxx.us
        DocumentRoot /var/www/intranet
        <Directory "/var/www/intranet">
                Options All MultiViews
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>
Here is code for a domain name that you just purchased and want to serve web content for:

Code:
<VirtualHost *>
        ServerName xxxxxxxxxx.us
        ServerAlias www.xxxxxxxxxx.us *.xxxxxxxxxx.us
        DocumentRoot /var/www/xxxxxxxxxx.us
        <Directory "/var/www/xxxxxxxxxx.us">
                Options All MultiViews
                AllowOverride All
                Order allow,deny
                Allow from all
        </Directory>
</VirtualHost>
When you are done you will need to go into 'sites-active' directory and make symbolic links to those virtual hosts that you just made.

NEXT ... very important ... RESTART the web server like this:

Code:
/etc/init.d/apache2 restart
You also have to think about DNS. Your dns should point to your machine's ip address for each of the domains (virtual hosts) that you are serving.

REMEMBER: you have to have a DNS entry for xxxxxxxxxx.us AND www.xxxxxxxxxx.us

For your intrAnet ... you need to update your DNS server ... or (if you don't have DNS running on your machine) run around and update the /etc/hosts file on each of your computers.

-- Tony
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
QUESTION: How to share a terminal session with a user nathan_clark80 Linux - Software 0 12-14-2004 12:17 PM
adding more web servers to make web server farm linuxboy69 Linux - Networking 5 07-09-2004 09:50 AM
understanding web servers noonday Linux - Networking 1 04-29-2004 08:19 PM
Shouldn't this be easier? (Web servers) newtolinux83 Linux - Newbie 4 06-03-2003 04:06 PM
2 web servers hawkes Linux - Networking 3 05-24-2001 10:39 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration