Keep Server Online
If you find the Apache Lounge, the downloads and overall help useful, please express your satisfaction with a donation.
or
A donation makes a contribution towards the costs, the time and effort that's going in this site and building.
Thank You! Steffen
Your donations will help to keep this site alive and well, and continuing building binaries. Apache Lounge is not sponsored.
| |
|
Topic: Apache runservice doesn't work on Windows server 2008 |
|
Author |
|
Rareform
Joined: 29 Sep 2016 Posts: 1
|
Posted: Thu 29 Sep '16 10:23 Post subject: Apache runservice doesn't work on Windows server 2008 |
|
|
Hello,
our apache server ran without problems, but after a windows update following issue arose:
If I try to run it as a service in the server Manager it gives me a Syntax error
Syntax error on line 56 of C:/Apache24/conf/extra/httpd-vhosts.conf:
56: DocumentRoot "//IVKPAPP002/tools_setup/software_share"
57: <Directory "//IVKPAPP002/tools_setup/software_share">
Now I already figured out, that it can't access this shared folder, which comes from other system, if I run it in the server manager or write "C:\Apache24\bin\httpd.exe" -k runservice in the console and gives the Syntax error above.
Yet, when I run the server through the console (the user is in all cases the same - me) via
C:\Apache24\bin\httpd.exe -d C:/Apache24 everything works fine and it starts so it sees the shared folder. I know it is also a microsoft issue, but maybe someone here knows the answer how I can make the runservice command to also see and access the shared folders. Thank you in advance and kind regards! |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Thu 29 Sep '16 13:52 Post subject: |
|
|
Does
C:\Apache24\bin\httpd.exe -d C:/Apache24 -k runservice
work in the console? |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 29 Sep '16 20:08 Post subject: |
|
|
Shares are only available if the Apache service is running (log on as) as a user (say Apache in this case) and that user has permissions to access the share. I don't see you mention this. The reason you can run it fine from the command line is it's running under your user account.
And what is "runservices"?
-k start : tell Apache to start
-k restart : tell running Apache to do a graceful restart
-k stop|shutdown : tell running Apache to shutdown
-k install : install an Apache service
-k config : change startup Options of an Apache service
-k uninstall : uninstall an Apache service
No, for some reason Apache doesn't complain about -k options it doesn't understand.
I tried your command line and Apache just runs like it normally would from the command line and holds the the shell till you ctrl+c. It doesn't release it after startup like it should if it starts the service. |
|
Back to top |
|
Jan-E
Joined: 09 Mar 2012 Posts: 1266 Location: Amsterdam, NL, EU
|
Posted: Thu 29 Sep '16 22:09 Post subject: |
|
|
glsmith wrote: | And what is "runservices"? |
Open 'services.msc', scroll to the Apache service, double click and look at the 'Path to executable'. You will see something like:
"D:\phpdev\apache24.x32\bin\httpd.exe" -k runservice
Apache itself puts the '-k runservice' there if you do a '-k install'. |
|
Back to top |
|
glsmith Moderator
Joined: 16 Oct 2007 Posts: 2268 Location: Sun Diego, USA
|
Posted: Thu 29 Sep '16 23:33 Post subject: |
|
|
Ahh, thanks. Never noticed that before though I do look to see the path to the executable there.
Edit: Thinking about it I have seen that, I just didn't put it together in my head. |
|
Back to top |
|
|
|
|
|
|