I don't know if it is the correct procedure, but it works.
Put this script wherever you want. Klick on it to start httpd.
If you want the server to start when X starts, put the script in /bin
and add the line
startweb
to /root/.xinitrc
Kark
'Start web server at boot' script
The script
oh, and the script. save it and change permission to executable.:
#!/bin/sh
cd /root/ghttpd/
./httpd
#!/bin/sh
cd /root/ghttpd/
./httpd
ghttpd
It would be adviseble to check or the server is running . From other people on this forum there was a note that it didn't .
When you run a script this should be in cgi-bin . But if the script call's a other one your directory is not cgi-bin but one level lower . A other fact is that you cann't have a directory under cgi-bin with scripts . They wouldn't work .
This is why the database.cgi not works , change the call quisp ... to quisp/quisp .. wil do the trick . After executing database.cgi the directory has become .../ghttpd and not .../ghttpd/cgi-bin as you exspected .
There has been reported a leak in ghttpd , has puppy a corrected version ?
Greatings Menno
When you run a script this should be in cgi-bin . But if the script call's a other one your directory is not cgi-bin but one level lower . A other fact is that you cann't have a directory under cgi-bin with scripts . They wouldn't work .
This is why the database.cgi not works , change the call quisp ... to quisp/quisp .. wil do the trick . After executing database.cgi the directory has become .../ghttpd and not .../ghttpd/cgi-bin as you exspected .
There has been reported a leak in ghttpd , has puppy a corrected version ?
Greatings Menno
Ok
this is just a script to start the httpd, it is not a script to be run BY the server upon request.
It is is simply there for lazy people, who doesn't want to start a terminal window, go to the right directory and type in the command to start the server.
However: I found that starting it at the same time as x, as it would try to start the server everytime I start x, so I put it in the local startup-script
I also put the "startweb" in /usr/sbin instead of /bin
I am completely blank when it comes to the placement of such scripts, but now it works the way I want it. The web server starts when I start my machine.
this is just a script to start the httpd, it is not a script to be run BY the server upon request.
It is is simply there for lazy people, who doesn't want to start a terminal window, go to the right directory and type in the command to start the server.
However: I found that starting it at the same time as x, as it would try to start the server everytime I start x, so I put it in the local startup-script
I also put the "startweb" in /usr/sbin instead of /bin
I am completely blank when it comes to the placement of such scripts, but now it works the way I want it. The web server starts when I start my machine.
server automatic start script
Guest wrote: "It is is simply there for lazy people, who doesn't want to start a terminal window, go to the right directory and type in the..."
Not necessarily so. Some of us run webservers full time, yet without the benefit of UPS systems. Should the power go out and come back on while we're away, it's nice to have the server restart without operator intervention.
Whether we're lazy or not is another matter.
Not necessarily so. Some of us run webservers full time, yet without the benefit of UPS systems. Should the power go out and come back on while we're away, it's nice to have the server restart without operator intervention.
Whether we're lazy or not is another matter.
Last edited by alienjeff on Tue 25 Jul 2006, 14:56, edited 1 time in total.
Re: Start web server script
??? Put what script where?Kark wrote:I don't know if it is the correct procedure, but it works.
Put this script wherever you want. Klick on it to start httpd.
If you want the server to start when X starts, put the script in /bin
and add the line
startweb
to /root/.xinitrc
Kark
[url]http://speakpup.blogspot.com[/url]