Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
05-30-2001, 09:54 AM
|
#1
|
LQ Newbie
Registered: May 2001
Posts: 1
Rep:
|
I’m running apache on a remote server and I need to be able to bring down apache and bring it back up, my only tool that I have is telnet ,can anybody inform me on how to go about doing this in a safe way
Thank you
|
|
|
05-30-2001, 10:01 AM
|
#2
|
LQ Guru
Registered: Jan 2001
Posts: 24,149
|
Well, what isn't safe these days, but I would recommend using SSH to do that type of task instead of telnet to start with.
|
|
|
05-30-2001, 10:25 AM
|
#3
|
Moderator
Registered: May 2001
Posts: 29,415
|
A general startup script u can find here. If ure a user put it in ure home dir and execute from there (if uve got the access rights to starting & stopping apache), if u own the box put the script in /etc/rc.d or equivalent to ure distro and execute from there, or make it a script in ure home dir.
What safety issues?
<Gratuitous warning=on>
Safe would be using ssh instead of telnet.
Sessions tru ssh are encrypted, tru telnet it isnt.
This means if someone would sniff ure telnet session it would be easier to get ure login/pass.
If u dont own the remote box tell the owners to install & use ssh. If thats not an option u/they at least gotta to look for access control restrictions tru TCP wrappers, IPChains rules and PAM access config to name a few -basic- security measures.
<Gratuitous warning=off>
|
|
|
05-30-2001, 12:05 PM
|
#4
|
Member
Registered: May 2001
Distribution: RedHat, 'drake, suse, slack, gentoo, beehive, lfs...
Posts: 43
Rep:
|
unSpawn is right - heed his warning. There are a million free and open source connection hijacking and sniffing tools that make it *ez* to take over a session, reset connections, and sniff for passwords. Go to freshmeat.net and look up 'hunt'.
Couple of ways to restart apache:
/etc/init.d/apache stop
/etc/init.d/apache start
---------or------------
ps -ef | grep httpd (or 'pgrep httpd' if your machine has pgrep)
kill -HUP <pid>
---------or------------
if it's a production box, or an active server,
'kill -USR1 <pid>'
...which will allow child processes finish up whatever they're doing before they exit.
A shortcut to finding the pid and restarting the server:
kill -USR1 'cat logs/httpd.pid' <-- note single quotes - you need those to perform command substitution in the shell.
|
|
|
All times are GMT -5. The time now is 04:09 AM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|