[Cialug] thttpd
Josh More
jmore at starmind.org
Sun Oct 2 20:38:11 CDT 2011
Do not do it this way,
If the startup file is in /etc/init.d, it is already in the startup system.
You just have to check that it is set in the proper runlevel.
In the RedHat/SUSE world, use the command chkconfig.
In the Ubuntu world, use update-rc.d.
Learn the paradigm of the system you're in and use it and you'll have far
fewer problems.
-Josh More
On Sun, Oct 2, 2011 at 8:30 PM, Charles Dunbar <ccdunbar at gmail.com> wrote:
> The easiest way I know (I do more redhat than debian, someone wiser
> might know more) would be to add the command in your crontab, since
> the init script doesn't seem to work well:
>
> $ sudo crontab -e
>
> Add the line:
>
> @reboot /usr/sbin/thttpd -C /etc/thttpd/thttpd.conf
>
> and save/exit the file editor.
>
> You can verify the full path of thttpd to see the exact file it's
> calling by typing:
> $ whereis thttpd
>
> Charles
>
> On Sun, Oct 2, 2011 at 7:53 PM, Tom Sellers <tomsellers2001 at yahoo.com>
> wrote:
> > That's the ticket! I can see my root page now. How do I make it start
> this
> > way each time I boot up the server without having to manually start it
> each
> > time?
> >
> > Thank you very much!
> > From: Charles Dunbar <ccdunbar at gmail.com>
> > To: Central Iowa Linux Users Group <cialug at cialug.org>
> > Sent: Sunday, October 2, 2011 7:37 PM
> > Subject: Re: [Cialug] thttpd
> >
> > Hey Tom,
> >
> > I just did a double check on my Ubuntu 10.10 box, hopefully it's
> > similar enough to help you out.
> >
> > After getting the package installed (sudo apt-get install thttpd), I
> > noticed it didn't auto-start like it says it does in the tutorial
> > you've linked.
> >
> > Most programs usually have a script in /etc/init.d/(program name) that
> > takes "start, stop, status, restart" as basic arguments, to see if the
> > program is running, and to start/stop the program. thttpd's script in
> > /etc/init.d/ did absolutely nothing, printing no errors or anything,
> > so I just ran the command by itself
> >
> > thttpd does not seem to work as I'd expect, with a "start" command in
> > the command, but trying it out reveled the arguments it could take:
> >
> > $ sudo thttpd start
> > usage: thttpd [-C configfile] [-p port] [-d dir] [-r|-nor] [-dd
> > data_dir] [-s|-nos] [-v|-nov] [-g|-nog] [-u user] [-c cgipat] [-t
> > throttles] [-h host] [-l logfile] [-i pidfile] [-T charset] [-P P3P]
> > [-M maxage] [-V] [-D]
> >
> >
> > Specifying the config file caused the server to start up:
> >
> > $ sudo thttpd -C /etc/thttpd/thttpd.conf
> >
> > search for thttpd in output of ps aux:
> >
> > $ ps aux | grep thttpd
> > www-data 23646 0.0 0.0 2312 616 ? Ss 19:31 0:00
> > thttpd -C /etc/thttpd/thttpd.conf
> >
> >
> > If you have any questions about the steps along the way, feel free to
> > ask. Jumping head first into Linux can be a bit daunting after years
> > of Windows.
> >
> > Charles
> >
> >
> > On Sun, Oct 2, 2011 at 7:00 PM, Tom Sellers <tomsellers2001 at yahoo.com>
> > wrote:
> >> You are talking over my head with most of these questions.
> >>
> >> I am the newbie of the group if you have been at the Des Moines
> meetings.
> >> I
> >> am trying to learn linux but it is quite different than I am use to
> since
> >> I
> >> have been a Windows guy for years.
> >>
> >> As for the log file there is none created. I performed the install as
> the
> >> root user (sudo). How do I determine what user/permissions it is
> >> attempting
> >> to start under?
> >>
> >> I followed a how to at the following web addresss.
> >>
> >>
> http://radagast.bglug.ca/howto_build_a_server/howto_build_a_server_part1
> >>
> >>
> >> From: Nathan C. Smith <nathan.smith at ipmvs.com>
> >> To: 'Central Iowa Linux Users Group' <cialug at cialug.org>
> >> Sent: Sunday, October 2, 2011 6:29 PM
> >> Subject: Re: [Cialug] thttpd
> >>
> >> Check the log files to see if there are any reasons for it not to start?
> >> Is
> >> it starting under the correct user permissions? Does the user it is
> >> trying
> >> to run as have permissions to the config or for the content it is trying
> >> to
> >> serve?
> >>
> >> -Nate
> >>
> >> From: cialug-bounces at cialug.org [mailto:cialug-bounces at cialug.org] On
> >> Behalf
> >> Of Tom Sellers
> >> Sent: Sunday, October 02, 2011 6:11 PM
> >> To: Linux User Group Iowa
> >> Subject: [Cialug] thttpd
> >>
> >> I installed thttpd on a server running Ubuntu 11.04 and can't seem to
> get
> >> it
> >> to start. I have examined the thttpd.conf file and compared it with an
> >> exmple that I found which did not turn up any issues. I created a short
> >> index.html file in the directory it told me to put it. However when I
> try
> >> to connect to the web page I get an error indicating the server is not
> >> running (no response!). I can ping the server from the machine I am
> >> attempting to browse from (on same local segment) but can't connect to
> the
> >> web page.
> >>
> >> I used the ps -e command to see all the running processes and don't see
> >> thttpd in there anywhere.
> >>
> >> I also looked in the directory where the log is to be but do not see any
> >> log
> >> there.
> >>
> >> Anyone willing to help me out on this?
> >>
> >> Thanks!
> >> _______________________________________________
> >> Cialug mailing list
> >> Cialug at cialug.org
> >> http://cialug.org/mailman/listinfo/cialug
> >>
> >>
> >>
> >> _______________________________________________
> >> Cialug mailing list
> >> Cialug at cialug.org
> >> http://cialug.org/mailman/listinfo/cialug
> >>
> >>
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> >
> >
> >
> > _______________________________________________
> > Cialug mailing list
> > Cialug at cialug.org
> > http://cialug.org/mailman/listinfo/cialug
> >
> >
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://cialug.org/pipermail/cialug/attachments/20111002/c6962cb3/attachment.html>
More information about the Cialug
mailing list