Integrating Allegroserve into your Apache-based web (added 4/30/04)

If you use an Apache webserver but want to also use Allegroserve, you must make the Apache webserver and the Allegroserve server work together. In this document, we suggest three ways to achieve this integration:

  1. Use a subdomain and run the Allegroserve on a separate machine.
  2. Run the Allegroserve on the same machine as Apache, but with a different port number.
  3. Map the Allegroserve webserver into a sub-URL of the Apache site.

Approach #1: Use a subdomain and run the Allegroserve on a separate machine

If your Apache webserver uses foo.com and www.foo.com, you can have your systems administrator add an additional name, perhaps www2.foo.com, which points to the machine that you set up your allegroserve program on.

Pros:

  • Avoids the use of http://domain:portnumber style URLs.
  • Avoids having to deal with configuring multiple IP addresses on a single machine.
  • Allows for proper traffic logging.
  • Requires no changes to the configuration of the Apache webserver.

Cons:

  • Requires a separate machine (but see note below).
  • Firewall configuration may need to be modified.

Note: on some operating systems, such as Linux, it is possible to do this on a single machine. Discussion of doing so, however, is beyond the scope of this article.

Approach #2: Run the Allegroserve on the same machine as Apache, but with a different port number

Simply start Allegroserve on a port number other than 80. Port 8000 is a common choice.

Pros:

  • No DNS changes are required.
  • No additional machine is required.
  • Allows for proper traffic logging.
  • Requires no changes to the configuration of the Apache webserver.

Cons:

  • Requires the use of http://domain:portnumber style URLs, which are not as aesthetically pleasing.
  • Firewall configuration may need to be modified.

Approach #3: Map the Allegroserve webserver into a "sub-URL" of the Apache site

This is a combination of approaches #1 or #2 and a technique called "reverse proxying". Basically, you tell apache that when an access to the sub-URL (or below) is made, behind the scenes it should retrieve the data from a different webserver and return it to the client. If your apache site is at http://foo.com, you can make your Allegroserve site accessible as a sub-URL like http://foo.com/subsite. To do this, add directives like these to your apache config file and restart apache:

ProxyPass /subsite http://aservehost
ProxyPassReverse /subsite http://aservehost

When this is in effect, an access to http://foo.com/subsite/xyz will end up accessing http://aservehost/xyz in a manner that is transparent to the web browser.

Pros:

  • No DNS changed are required.
  • URLs appear more consistent.

Cons:

  • Logging on the Allegroserve side will not have proper IP address information. All accesses will appear to be from the machine that runs Apache.
  • Much more care needs to be exercised when generating URLs. For example, if a page in the subsite references '/index.html', the browser will end up accessing http://foo.com/index.html, which may or may not be what you intended.
  • Requires Apache configuration changes. May require a rebuild of Apache to get the mod_proxy module.
  • Performance may be a bit slower due to the shuttling of responses between the Allegroserve webserver and the Apache webserver.
Copyright © 2023 Franz Inc., All Rights Reserved | Privacy Statement Twitter