|
Apache and why you can't get things to work on Vista/Win7 |
|
|
|
|
Written by Gregg
|
|
Thursday, 24 June 2010 20:09 |
I have now seen this question, well problem, in forums enough to get tired of typing out the answer let alone explain what is happening. It's not a Win7 or Vista thing, yet it is, just not how you see it. There are plenty of Apache's running with all the extra goodies on Windows Vista and Windows 7.
The problem, is that you go to add something, like php for instance, to your Apache config and when you save your changes and restart, they seem to have not taken effect. What is happening here is you are running into what I call "The User Space BS." I call it this for no other reason than I do not remember if I saw a proper term for it or not and even if I did, remembering it 5 minutes later is slim to none at best.
This happens mostly on Apache that was installed with the .msi installer from Apache.org, and probably WAMP, XAMP, ect. ect. that use installers. They by definition of being an installer have to be run as Administrator. The Apache service itself runs as the user System.
Now when you edit the httpd.conf file, you make your changes and save them, Vista and Seven save these changes in a copy of httpd.conf that is your C:\Users folder somewhere. This of course is to keep grandma from editing a file and having her application and or computer quit working properly. However, Microsoft seems to have thrown the Rule of Least Surprise out the window by doing this. I say this because you make and save your changes, they do not seem to take effect and you are nothing but surprised. They probably should have just left it as an access denied prompt instead. So here is what you are going to have to do.
Open Notepad (or your favorite text editor) as Administrator. You do this simply by right clicking on it's icon in the menu and selecting "Open as Administrator."
- Open the httpd.conf file in Apache's conf/ folder. As soon as you do you will notice there are no changes in there you made prior.
- Edit the file making the necessary changes and save the file.
- Restart Apache.
I bet they took effect this time!
|