httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From 0149486101 <0149486...@netcabo.pt>
Subject Re: [users@httpd] Apache2 service user
Date Tue, 21 Oct 2003 06:46:27 GMT
I've just removed and reinstalled the apache2 service (I had to restart the
computer) and it still doesn't work:
Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.
F:\users\Administrator>cd\programas
F:\programas\Apache Group\Apache2\bin>apache -k install
F:\programas\Apache Group\Apache2\bin>apache -h
Usage: apache [-D name] [-d directory] [-f file]
              [-C "directive"] [-c "directive"]
              [-w] [-k start|restart|stop|shutdown]
              [-k install|config|uninstall] [-n service_name]
              [-v] [-V] [-h] [-l] [-L] [-t] [-S]
Options:
  -D name           : define a name for use in <IfDefine name> directives
  -d directory      : specify an alternate initial ServerRoot
  -f file           : specify an alternate ServerConfigFile
  -C "directive"    : process directive before reading config files
  -c "directive"    : process directive after reading config files
  -n name           : set service name and use its ServerConfigFile
  -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
  -w                : hold open the console window on error
  -e level          : show startup errors of level (see LogLevel)
  -E file           : log startup errors to file
  -v                : show version number
  -V                : show compile settings
  -h                : list available command line options (this page)
  -l                : list compiled in modules
  -L                : list available configuration directives
  -t -D DUMP_VHOSTS : show parsed settings (currently only vhost settings)
  -S                : a synonym for -t -D DUMP_VHOSTS
  -t                : run syntax check for config files

F:\programas\Apache Group\Apache2\bin>apache -k config -d "f:/http" -f
"f:/progr
amas/apache group/apache2/conf/httpd.conf"

F:\programas\Apache Group\Apache2\bin>apache -k start
(the service didn't start)
F:\programas\Apache Group\Apache2\bin>net start apache2
The Apache2 service is starting.
The Apache2 service could not be started.

A service specific error occurred: 1.

More help is available by typing NET HELPMSG 3547.

Event viewer:
The Apache service named  reported the following error:
>>> (20024)The given path misformatted or contained invalid characters:
Invalid config file path f:/programas/apache group/apache2/conf/httpd.conf  
  .

For more information, see Help and Support Center at
http://go.microsoft.com/fwlink/events.asp.

When I change the user back to LocalSystem it works again.

Finally, I don't know why on earth apache looks for the config file under
bin if the -f parameter is not specified. Again, it works fine with
LocalSystem.

Thank you.

--------- Original Message --------
From: users@httpd.apache.org
To: "users@httpd.apache.org" <users@httpd.apache.org>
Subject: Re: [users@httpd] Apache2 service user
Date: 21/10/03 01:02

On Mon, 2003-10-20 at 17:25, 0149486101@netcabo.pt wrote:
> Hi. I've trying to run the apache2 service using a user other than
> LocalSystem under Windows XP Pro.
> So, I created a new limited account, and, as stated in
> http://httpd.apache.org/docs-2.0/platform/windows.html , I granted the
> privileges "Log on as a service" and "Act as part of the operating system"
> to the new user.
> However, when I tried to start the apache2 service using this new account,
> it failed to start:
> 
> The Apache service named reported the following error:
> >>> Apache.exe: could not open document config file bin/conf/httpd.conf .

....why is conf in bin?
> 
My guess is that the service entries are in correct.

HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesApache2
ImagePath [REG_EXPAND_SZ] 
'"[path to apache.exe]" -k runservice'
note: there are imbeded quotes around the path to apache.exe

Parameters -> ConfigArgs [REG_MULI_SZ] 
'-d [apache root dir] -f [apache conf file]'
note: there is a binary zero between these two arguments and two binary
zeros at the end - that is what REG_MULTI_SZ means

You must use care when you edit these ... my preference is to let
apache.exe do it - though you have to set the username and password
manually to the best of my knowledge. 

> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> 
> Then I tried to add the start parameter "-f f:/programas/apache
> group/apache2/conf/httpd.conf", and I got the following instead:
> The Apache service named reported the following error:
> 
> >>> (20024)The given path misformatted or contained invalid characters:
> Invalid config file path f:/programas/apache group/apache2/conf/httpd.conf
> .
> 
> For more information, see Help and Support Center at
> http://go.microsoft.com/fwlink/events.asp.
> 
> I tried to add quotes, use "" in place of "/"; nothing worked. I'm sure
> the new user had privileges to access every file it needed.
> 
> 
> I also have another problem: apache is sending the directory listings in
> UTF-8, which is strange because 1.3.28 used not to.
> 
> Any help in solving these problems would be
> appreciated.
> 
> 
> 
> 
> ---------------------------------------------------------------------
> The official User-To-User support forum of the Apache HTTP Server Project.
> See <URL:http://httpd.apache.org/userslist.html> for more info.
> To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
> " from the digest: users-digest-unsubscribe@httpd.apache.org
> For additional commands, e-mail: users-help@httpd.apache.org
> 

I suggest you try this... (uninstall and re-install apache)

cd to the apache bin directory...

type this command 'apache -h' to check syntax

you may have to specify -f [path conf file]

type this command 'apache -k uninstall' to uninstall
type this command 'apache -k install' to re-install

then go back and reset the user and password

test by running 'apache -k start'

then try and see if it auto starts


Chris





---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
" from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org



---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message