Go Back   CodingForums.com > :: Server side development > Apache configuration

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 01-14-2003, 09:38 PM   PM User | #1
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
How would I configure Apache to act like two servers

I'm talking Apache 1.3.something on Win2K - it's all set up fine for c://docs/ as the document root, but what I'd like is a second folder at c://docs_new/ to also be accessible - like a secondary dev server.

I'm thinking bind the second folder to a different port ... but I don't know how to do that ..?
brothercake is offline   Reply With Quote
Old 01-15-2003, 12:31 AM   PM User | #2
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,906
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
You can tell apache to 'listen' on ports other than 80.. - look in your httpd.conf for the Listen directive , eg

Listen 81


now you could add something like this... (NOTE - these are very slack permissions , just get it working first then tighten up a little )

<VirtualHost 127.0.0.1:81>
ServerAdmin whoot@yaks.com
DocumentRoot c:/new_docs
ServerName localhost
<Directory "c:/new_docs/">
Options All
AllowOverride none
Order allow,deny
Allow from all
</Directory>
</VirtualHost>


restart apache ! & nav to http://localhost:81

you can do name based virtual hosts as well but thats a pain on win32 (as everyones system seems to have its own take on where and how the hostnames are resolved IME!)
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)
firepages is online now   Reply With Quote
Old 01-15-2003, 12:49 AM   PM User | #3
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
dude that's great slack permission are not a problem because it's a private lan.

A quick question though (if you happen to know offhand) - when I'm surfing on that port and I click a link, does it stay on that port or do I need to take care of that myself?

Last edited by brothercake; 01-15-2003 at 12:52 AM..
brothercake is offline   Reply With Quote
Old 01-15-2003, 10:23 AM   PM User | #4
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
Nevermind - seen.


But now - although port 81 works fine, port 80 to the default folder doesn't work at all anymore ??
brothercake is offline   Reply With Quote
Old 01-15-2003, 04:19 PM   PM User | #5
firepages
Super Moderator


 
Join Date: May 2002
Location: Perth Australia
Posts: 3,906
Thanks: 5
Thanked 79 Times in 78 Posts
firepages will become famous soon enough
Sorry mate me head a'int screwed on properly this week !

you need to listen to both ports , then both should work fine.

Listen 81
Listen 80
__________________
resistance is...

MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)
firepages is online now   Reply With Quote
Old 01-15-2003, 11:45 PM   PM User | #6
brothercake
Senior Coder


 
Join Date: Jun 2002
Location: near Oswestry
Posts: 4,508
Thanks: 0
Thanked 0 Times in 0 Posts
brothercake is an unknown quantity at this point
doh !


thanks
brothercake is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

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 On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 02:05 AM.


Advertisement
Log in to turn off these ads.