# Thread: Starting Apache as a Service

1. In XP, I have Apache setup to only start manually, but I'd like to make it a service so it starts whenever the computer is on. Is there any easy way to change this in a conf file somewhere, or do I need to reinstall and choose "Install as service"?

2.

3. Once installed, add apache to the list in Start - All Programs - Startup. Then apache will be run when the machine boots. There are other ways to do it, but that's the way I like best as it's easy to remove things again.

4. But that keeps the console window open all the time, which I wanted to avoid.

5. There is probably a better solution, but you can set as a startup item a batch file containing:
Code:
net start apache
Or, for Apache 2,
Code:
net start apache2
I'm sure there's a better solution, though.

6. I'm not in front of my home computer at the moment, but I think it won't recognize Apache until the console is started. Otherwise, you get something like "Unrecognized service: 'Apache'".

7. You can register your own custom service:

c:> sc.exe create "apache" binPath= "c:\path\to\apache.exe"

Notice the space after binPath=, it won't work without that.

Once you've registered the service you can take a look at the properties through administrative tools/services and edit it further from there.

8. This is exactly what I was looking for! Thanks mossoi and everyone else