Trying to Install to Root Directory and Failing

Started by Blerp, April 15, 2015, 08:09:10 PM

Previous topic - Next topic

Blerp

I'm pretty new to all of this stuff, and I can't seem to overcome the first step. I'm operating on Windows Vista, and I'm pretty sure the root is c:\Windows, but whenever I try extracting Apache24 to it I get a WinRAR diagnostic message saying that the folders cannot be created and that access is denied. What's going on here? Am I trying to extract it to the wrong location?

Gregg

Hi Blerp,

Welcome to the Wonderful World of Apache.

Yes (to extracting to the wrong location), the root (like on plants) is at the bottom. In your case, the root of the C drive is C:\. What you should end up with is C:\Apache24. Is that not shown as an example?

It really doesn't matter where you put it, but that location is where it is pre-configured for. It's suggested not to put in C:\Windows or C:\Program Files (or C:\Program Files (x86) on 64bit Windows) because it can cause headaches, one of which you are seeing right now :)


Blerp

Thanks for the help!

Alright, so I've managed to extract the file, but I'm getting this in the command prompt: http://i.imgur.com/CvU3Jpt.png?1

And when I try to access the localhost via my browser I just get a blank page.

Gregg

When you started Apache did it pop up a dialog about allowing it through the firewall?


Blerp

I don't believe so. Also, I just edited the above comment. I looked back at the command prompt and it's saying something funky.

Gregg

Ah, ok. What it is saying is that something is already using port 80. It may be Apache is already running (though at this point I doubt that).

Are you using Skype? Skype is notorious for stealing ports 80 (http) and port 443 (https) even though it doesn't need to.

Blerp

I am using Skype. Is it enough to close Skype, or do I have to uninstall it?

Gregg

There is a setting in skype that will make it not use ports 80 & 443.
Just uncheck it and restart Skype.

See: https://community.apachefriends.org/f/viewtopic.php?f=16&t=69784#p239060

This may not be your specific problem, but it is one that is very common to run into. If this is not the problem, then what is using the port/ports needs to be found and dealt with.

Running a command prompt as Administrator, type: netstat -ab

It's ugly and a lot to look at but find anything that is using port 80 and/or 443.

Blerp

Changing the settings in Skype worked! I'm just about finished, but I'm running into one last roadblock: I tried entering http -k install, but I'm getting an Access Denied message where it says that I perhaps forgot to log on as an administrator, but I'm definitely logged in as a administrator.

Thank you so much for your help! I really appreciate this.

Gregg

The only real administrator is the user "Administrator" and that account is disabled by default. You probably have administrative rights and are part of the administrators group, but you're not really the administrator (unless you activated the account so you can log in with it). Right click on the command prompt icon and choose "Run as Administrator" ... the you can cd to the bin folder and install the service.

Blerp

Okay, I went in as Admin and installed it. Now I just need to figure out how to run it. I tried typing in "httpd.exe" but nothing happened, and when I tried "-k run" it said the command was invalid. I think this is the last step, but I'm not too sure. I'm just trying to do this so that I can install Wordpress.

Gregg

Nothing happened, but really it did. If you start Apache at the command prompt it says nothing and the cursor just sits there and blinks at you. At that point however, if you used http://localhost in your browser you should have gotten the It Works page.

But you have installed the service so Apache will start automatically on next boot. There are however two ways to start it without a reboot.

1. httpd -k start .. not run
2. net start apache2.4

both should do the same thing, start the service running.

Blerp

I ran "-httpd -k start" and I'm just getting a blinking cursor on the next line. How do I start configuring?

Gregg

I guess that depends on what you want to do.

Apache is partially configured (should be) so you should be able to view the "It Works" page as soon as you start it. Remember that when you start it, that cursor will just blink, nothing more. httpd -k start is supposed to release the command prompt, maybe not right away but should eventually. Unless there are error messages, Apache should be running.

Study conf/httpd.conf first. Want to know what any single directive is, just look it up.
http://httpd.apache.org/docs/2.4/mod/quickreference.html

A little reading of the docs for background is not a bad idea. It's a hard read at first but gets easier as your understanding gets greater. One thing to note is context, Apache is a highly configurable beast but some things can only be configured in certain places while others can be done anywhere. It is also very modularized so not everything is available without the proper module loaded. I will not say we ship with the very minimum needed, but we do not just enable everything either.