Jump to content
The Uniform Server Community

Unable to start Apache service


DHaslam
 Share

Recommended Posts

I have just downloaded Uniform server.

 

I am able to load the Apache server using the "start as a program" option, but am having problems starting as a service.

 

I have successfully installed the service and it is showing in Windows control panel (on a Windows 2003 server).

 

However, when I try to start the service (either using the option in your "start as service" applet or directly from the Windows services.msc console) the service fails to start.

 

An error is reported in the Windows Application event log "httpd1.exe: Could not open the configuration file bin/conf/httpd.conf. The system cannot find the specified path". The problem appears to be that httpd1.exe is not looking in the (full) correct path for httpd.conf which is located in E:\WampServer\UniServer\usr\local\apache2\conf

 

I can see that the service runs the command "E:\WampServer\UniServer\usr\local\apache2\bin\httpd1.exe" -k runservice"

 

Is there an ini file setting or registry setting that needs to be changed to specify the full path location for where httpd.conf resides ?

Link to comment
Share on other sites

That’s an interesting problem, Apache normally locates correct configuration path.

However Apache can be forced to use a different configuration file using the following format:

 

httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf"

Assuming you are using Coral 8.6.2 edit file:

C:\UniServer\uni_con\includes\core_functions_inc.vbs

 

Locate this line (959):

strCmd = US_APACHE_BIN & "\" & Apache_exe & " -k install -n " & Chr(34) & service_name & Chr(34)

Change to:

strCmd = US_APACHE_BIN & "\" & Apache_exe & " -k install -n " & Chr(34) & service_name & Chr(34) & " -f " & Chr(34) & USF_APACHE_CNF & Chr(34) 

That will force Apache to use the default config file.

 

Issue may be specific to Windows 2003 anyway let me known if the above works.

 

Note: Added to Coral 8.6.3 (next release!)

 

All the best

Ric :)

Link to comment
Share on other sites

That’s an interesting problem, Apache normally locates correct configuration path.

However Apache can be forced to use a different configuration file using the following format:

 

httpd.exe -k install -n "MyServiceName" -f "c:\files\my.conf"

Assuming you are using Coral 8.6.2 edit file:

C:\UniServer\uni_con\includes\core_functions_inc.vbs

 

Locate this line (959):

strCmd = US_APACHE_BIN & "\" & Apache_exe & " -k install -n " & Chr(34) & service_name & Chr(34)

Change to:

strCmd = US_APACHE_BIN & "\" & Apache_exe & " -k install -n " & Chr(34) & service_name & Chr(34) & " -f " & Chr(34) & USF_APACHE_CNF & Chr(34) 

That will force Apache to use the default config file.

 

Issue may be specific to Windows 2003 anyway let me known if the above works.

 

Note: Added to Coral 8.6.3 (next release!)

 

All the best

Ric :)

 

Hi Ric,

 

Thanks for the reply. I tried changing the code as you described, un-installed and re-installed the services, but the Apache service still fails to start.

The following entry is added to the system Application log:

 

The Apache service named reported the following error:

>>> (20024)The given path is misformatted or contained invalid characters: AH00532: Invalid config file path E:\\WampServer\\UniServer\\usr\\local\\apache2\\conf\\httpd.conf .

 

For some reason, the backslashes in the path name seem to be doubling up ?

 

N.B. The SQL service starts fine and I can run Apache on this machine "as a program" - it is just failing to start as a service.

 

Did I need to do anything beyond re-installing the services or is there something else I am missing ?

 

Many thanks

 

Darrell

Link to comment
Share on other sites

Hi Ric,

 

Any more thoughts ?

 

 

 

Hi Ric,

 

Thanks for the reply. I tried changing the code as you described, un-installed and re-installed the services, but the Apache service still fails to start.

The following entry is added to the system Application log:

 

The Apache service named reported the following error:

>>> (20024)The given path is misformatted or contained invalid characters: AH00532: Invalid config file path E:\\WampServer\\UniServer\\usr\\local\\apache2\\conf\\httpd.conf .

 

For some reason, the backslashes in the path name seem to be doubling up ?

 

N.B. The SQL service starts fine and I can run Apache on this machine "as a program" - it is just failing to start as a service.

 

Did I need to do anything beyond re-installing the services or is there something else I am missing ?

 

Many thanks

 

Darrell

Link to comment
Share on other sites

  • 3 weeks later...

Hi all,

 

First time here and just found out about The Uniform Server! :D

 

Downloaded it, extracted, moved to C:/UniServer and used the start_as_program.exe.

When I ran it the very first time it took ages for the MySQL password to be changed ;)

 

Once it was finally done I clicked the Start both button. Immediately the apache server kept crashing and I too was getting the Unable to start Apache server message over and over and over...

 

I then terminated the corresponding exe and decided to reboot my system. After doing that the error appeared again when clicking the button :)

 

I then decided to re-extract the downloaded archive but this time immediately to C:/UniServer instead of extracting it in my download folder and then moving it over to C:.

 

So this tells me that UniServer is NOT portable! Quite important I recon and this should be mentioned when downloading!

 

PS: Did a fresh install of Win 7 x86 today before trying UniServer for the 1st time.

In all honesty not a very good 1st impression. I also have XAMPP installed but wanted to try this one out.

Anyway, I'll give this one a try (it works now) but maybe this needs to be fixed or something?

Haven't tried installing as service though but don't feel like I need to.

Link to comment
Share on other sites

No edit function here?

 

In response to my previous post:

I figured it out now... I guess. Uniform Server is indeed portable BUT can only be used when no spaces are present in the folder names.

When I first extracted it, it was extracted to my downloads folder which has a space in it. Now it resides in my C folder and works perfectly.

I copied it to a different HDD (different folder) and it works as well. Maybe upon extracting first time there were spaces created in the extracted directories or something which kinda broke it.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...