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 5 of 5
  1. #1
    New Coder
    Join Date
    Sep 2002
    Location
    eNYCe
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts

    1 instance of Apache running 2 sites on 2 different ports @ localhost

    I would like to run more then one site from one Apache instance at localhost. Each site is at a different directory and can be accessed from a different port, I currently have this set up by running multiple instances of Apache, but this is eating away my ram, how can I set up httpd.conf to work more then one site via port number.

    Accessing the sites by directory is not an option, the sites use absolute paths and wont work as a subdirectory (I can't do http://localhost/site1/ and http://localhost/site2/ gotta be http://locahost:81/ and http://locahost:82/)

  • #2
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #3
    New Coder
    Join Date
    Sep 2002
    Location
    eNYCe
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Exactly like that! Thanks. Just reclaimed 25mb of ram...

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Not surprised ... I must admit I cringed at the thought of you running multiple instances
    "Why bother with accessibility? ... Because deep down you know that the web is attractive to people who aren't exactly like you." - Joe Clark

  • #5
    New Coder
    Join Date
    Sep 2002
    Location
    eNYCe
    Posts
    83
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Actually I just read of a technique of using two Apache instances to ease the load on a server. One instance is barebones, the other has all the features you need for your application (PHP and any other modules/extensions) Your scripted (PHP) files will naturally only work with the one server, but your jpgs and gifs are accessed through the barebones instance. Supposedly this is easier on the server because PHP and other modules are not instantiated for each 45 byte spacer image that get's served.

    The choice of which server handles the request is done via checking the file extension (or lack of one) in the apache configuration files, I wonder if that regex checking does not take more load then just serving the images?


  •  

    Posting Permissions

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