CodingForums.com

CodingForums.com (http://www.codingforums.com/index.php)
-   Apache configuration (http://www.codingforums.com/forumdisplay.php?f=69)
-   -   How would I configure Apache to act like two servers (http://www.codingforums.com/showthread.php?t=12960)

brothercake 01-14-2003 09:38 PM

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 ..?

firepages 01-15-2003 12:31 AM

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!)

brothercake 01-15-2003 12:49 AM

dude that's great :thumbsup: 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?

brothercake 01-15-2003 10:23 AM

Nevermind - seen.


But now - although port 81 works fine, port 80 to the default folder doesn't work at all anymore ??

firepages 01-15-2003 04:19 PM

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

brothercake 01-15-2003 11:45 PM

doh !


thanks :)


All times are GMT +1. The time now is 12:54 AM.

Powered by vBulletin®
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.