Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 6 of 6
  1. #1
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts

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

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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)

  • #3
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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 01:52 AM.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Nevermind - seen.


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

  • #5
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,108
    Thanks
    11
    Thanked 101 Times in 99 Posts
    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)

  • #6
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    doh !


    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •