Skip to content

Instantly share code, notes, and snippets.

@cocolote
Last active August 29, 2015 14:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cocolote/4e05c58309b1e988519b to your computer and use it in GitHub Desktop.
Save cocolote/4e05c58309b1e988519b to your computer and use it in GitHub Desktop.
Apache Installation

#Install Apache server on Windows 7 64 with IIS running

Check first if you have the dependencies installed in your computer. You need Visual C++ 2008 Redistributable Package Open the control panel (window+r type "control" and press "enter") check if you see the package installed.

Get the Apache .zip. This is and official third party site, Apache does not provide a package to install in windows, you would have to build it manually.

Unzip the file and move or copy its content into C:\Apache22

To start Apache open a command prompt (windows+r type "cmd" press "enter"). Navigate to *C:\Apache22\bin* and type httpd.exe then enter

If there are any errors it will let you know now.

open a browser and enter the URL: http://localhost

If you have a problem regarding the port :80 it means that you have another server running in your local machine that is using this port.

To sove the port :80 issue you need to do some configuration to Apache.

Open a File explorer (windows+e) navigate to *C:\Apache22\conf* and open the file httpd.conf with your favourite text editor.

  • Look for Listen you are gonna find somethig like this:
# Listen: Allows you to bind Apache to specific IP addresses and/or
# ports, instead of the default. See also the <VirtualHost>
# directive.
#
# Change this to Listen on specific IP addresses as shown below to
# prevent Apache from glomming onto all bound IP addresses.
#
Listen 12.34.56.78:80

Change the last line to this:

#(omited lines)
#Listen 12.34.56.78:3000
Listen 3000

I'm using the port 3000 but you can use whatever you like.

  • Look into the file for ServerName, you will find something like this:
# ServerName gives the name and port that the server uses to identify itself.
# This can often be determined automatically, but we recommend you specify
# it explicitly to prevent problems during startup.
#
# If your host doesn't have a registered DNS name, enter its IP address here.
#
ServerName localhost:80

Change the server name to be:

#(omited lines)
ServerName localhost:3000

Now to load your sites you would have to navigate to http://localhost:3000

If you had some website to try you probably notice that the .css, .js and pictures weren't loaded. To solve this problem you need to keep modifying the httpd.conf file

  • Look for DocumentRoot, you will find something like this:
# DocumentRoot: The directory out of which you will serve your
# documents. By default, all requests are taken from this directory, but
# symbolic links and aliases may be used to point to other locations.
#
DocumentRoot "/Apache22/htdocs"

Comment the last line and add this:

#
# DocumentRoot "/Apache22/htdocs"
DocumentRoot "c:/ColdFusion11/cfusion/wwwroot/"

DocumentRoot has to be the location where you have your websites Because this is ColdFusion my location is the one avobe.

  • Look for **<Directory "/Apache22/htdocs">, you will find this:
# Note that from this point forward you must specifically allow
# particular features to be enabled - so if something's not working as
# you might expect, make sure that you have specifically enabled it
# below.
#

#
# This should be changed to whatever you set DocumentRoot to.
#
<Directory "/Apache22/htdocs">

change the to match the DocumentRoot:

# This should be changed to whatever you set DocumentRoot to.
#
# <Directory "/Apache22/htdocs">
<Directory "C:\ColdFusion11\cfusion\wwwroot">

That would be all now you are ready to install ColdFusion 11 and start to code.

To install ColdFusion 11 with Apache server whatch this video

Happy code!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment