I got up and running a reverse proxy on apache2 under Linux (Ubuntu). Now i see that there is a different folder-structure under Windows. My linux-conf - files don't work under windows or am i wrong?
Please show me the way
I got up and running a reverse proxy on apache2 under Linux (Ubuntu). Now i see that there is a different folder-structure under Windows. My linux-conf - files don't work under windows or am i wrong?
Please show me the way
As John has alluded to, the default configuration for Apache installed on Windows is at
Program Files\Apache2.2\httpd.conf
in a flat file. The path may be somewhat different, as I don't have a Windows machine handy at the moment. Most Linux distributions have their own custom hierarchical structure which looks something like the following. This example is from Debian and may vary with other distributions./etc/apache2/
apache2.conf
Package provided configurationconf.d/
httpd.conf
Local configuration file. Overrides contents of apache2.confmods-available/
mods-enabled/
mods-available
. Links are created/removed witha2enmod
anda2dismod
. Creating a link enables the given module.ports.conf
Enabled portssites-available/
VirtualHost
-style configuration filessites-enabled
sites-available
. Links are created/removed witha2ensite
anda2dissite
. Creating a link enables the given site.I've described all this to hopefully make it easier to understand how to replicate it under Windows. With the exception that links are not well supported under Windows (has this changed in Vista/Server 2008/Windows 7?) it's relatively easy to set this structure up. But you will have to do it manually, since the default configuration doesn't do it for you. Make sure you adjust the following to match the Linux distribution you're migrating from.
Assuming the original configuration file on Windows is at
\Program Files\Apache2.2\httpd.conf
(again, this may not be the correct location, I'll need to check a Windows machine to be sure), create the following directories:\Program Files\Apache2.2\conf.d\
\Program Files\Apache2.2\sites-enabled\
You don't need the
sites-available
directories since links aren't supported under Windows. You can add them if you want, but things won't work the same. Also, I'd recommend putting the module configurations into the httpd.conf file. Since they aren't managed by the package manager, it will be easier to just keep them in one spot.Make any modifications from the Linux
httpd.conf
file to the Windows file. If you have anapache2.conf
file under Linux, this is easy, sincehttpd.conf
will only have overrides forapache2.conf
.Add a
ports.conf
file, if desired. The contents of this can also exist in the httpd.conf file.Copy files that exist in the Linux
conf.d
directory into the Windows directory. Make sure the filenames end with.conf
, adding it if it wasn't there before. This is done to help make directory parsing (set up below) less error prone.Copy files that exist in the Linux
sites-enabled
directory into the Windows directory. As in step 4, make sure the filenames end with.conf
, adding it if it didn't exist under Linux.Add the following to the end of the httpd.conf file:
Restart Apache. Make sure you check for and correct any configuration errors.
This might not get you there 100%, but it should get you close.
Is there any reason you can't create the same folder structure under Windows as you have under Linux? You can't expect to just install Apache and have it magically create a tree of folders that aren't part of it's default configuration. Create the same structure, copy the configs and edit as and where appropriate.
now i have found the Solution with the following :
and this goes to C:\Program Files\Apache Software Foundation\Apache2.2\conf\extra\httpd-vhosts.conf
It is realy simple if you know where to put the parameters because the standard folder structure after standard-setup is different for apache2.2 on ubuntu 8.04 and windows2008.
Peace
Ice