This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Trailing commandline arguments not allowed.


George,

Use a little judgement.  For example, I run httpd as "nobody" (a new user
I created for just that purpose).  I also used the "-t manual" cygrunsrv
parameter, which means I have to start httpd manually (which suits me
fine).  You can use "-t auto" instead if you want the service to be
started at boot (when, in fact, something like "cygrunsrv -S" does
happen).  The reason you need "cygrunsrv -S" in the instructions is that
simply adding the service, even with "-t auto", won't start it in the
current session.

As for your apache not working, see if there are any messages in
/var/log/httpd.log, /var/log/apache/error_log, and the Windows Event log.
It's likely either a permissions problem, or a problem with httpd.conf
syntax.

As a datapoint, try removing the service and starting httpd from the
command line with the exact same flags as cygrunsrv starts it with (i.e.,
"-F").  This will at least eliminate httpd.conf syntax (if the service
starts correctly).  For a more definite experiment, try running it from a
system-owned shell.
	Igor

On Sun, 21 Mar 2004, George Hester wrote:

> Yes I do.
>
> So I followed the directions.  It said "you must run httpd as root initially."
>   To do this make a change so that I have, " User Guest."
>  Of course no one in their right mind enables the Guest account
> but I went ahead and left my Guest account alone
> (the directions did not say to enable that account) and made the entry directed.
>
> Then the directions say, "To install and start the HTTP daemon as Windows service use
> this command:
>
>   $ cygrunsrv -I httpd -d "CYGWIN httpd (apache)" -p /usr/sbin/httpd.exe -a "-F"
>   $ cygrunsrv -S httpd "
>
> So I went ahead and did that.  The Service is now in my Services applet set to start automatically at boot.
>   This looks alittle suspicious to me since the $cygrunsrv -S httpd will NOT occur at boot
> but hey I'm just following the directions.
>
> I rebooted and the Apache server was not working.  I had to fire up Cygwin off my desktop into
>  the bash shell and
> $/usr/sbin/apachectl start to get the server running.
>
> Again this is not the normal way of a service at boot.  It doesn't work.
>
> Any other suggestions to get the Apache server to start as a service in the normal way?
>
>
> George Hester
> __________________________________
> Igor Pechtchanski wrote:
>
> > George,
> >
> > I'm sure you have a /usr/share/doc/Cygwin directory on your system.  Look
> > for the file named apache-1.3.29-1.README in that directory.  Judging by
> > your reply, you looked in /usr/share/doc, not in /usr/share/doc/Cygwin.
> > Igor
> >
> > On Sun, 21 Mar 2004, George Hester wrote:
> >
> > > I don't have a folder by that name.  I have folder called
> > > apache-1.3.29-eapib and that's it.  The puny Readme in that said nothing
> > > about running Apache as a service.  Thanks anyway.
> > >
> > > George Hester
> > > __________________________________
> > > Igor Pechtchanski wrote:
> > >
> > > > George,
> > > >
> > > > Please (re)read /usr/share/doc/Cygwin/apache-1.3.29-1.README, which is the
> > > > official documentation for apache on Cygwin.  Any other occurrences of
> > > > "Cygwin" in the Apache documentation should be considered incidental, and
> > > > are subsumed by that README.
> > > > Igor
> > > >
> > > > On Sun, 21 Mar 2004, George Hester wrote:
> > > >
> > > > > Hi Igor.  Crap I messed up in my last post.  Please do not read it.  It
> > > > > will only upset you.
> > > > >
> > > > > I got the service to exist in the Services applet with:
> > > > >
> > > > > $cygrunsrv -I Apache -p /usr/sbin/httpd.exe -t auto
> > > > >
> > > > > but it does not behave as a normal service.  A normal service set to
> > > > > auto

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]