View Full Version : 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/)
04-10-2003, 10:17 PM
Like this http://www.codingforums.com/showthread.php?s=&threadid=12960
Exactly like that! Thanks. Just reclaimed 25mb of ram...
04-12-2003, 02:11 AM
Not surprised ... I must admit I cringed at the thought of you running multiple instances :rolleyes: ;)
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. :rolleyes:
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? :cool: :confused:
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.