Solved

how do i restart apache?

Posted on 2004-03-22
5
450 Views
Last Modified: 2010-03-04
hey, I am relatively new to tomcat/apache and need to deploy a serlvet, here are my questions

1) Is this correct?  to deploy a servlet.  I understand the steps are:
  a) create web.xml in WEB-INF (i told tech support i cant find web.xml in WEB-INF, and he told me to just create it)
  b) restart apache (or do i have to restart tomcat too?).

2) Now the problem is the admins are been a pain in the #*&#@ and wont let me restart the server myself.  I do have ssh access to the server. So what dir do i goto to find the restart script for apache (and tomcat too if i need it).  Like for weblogic, it's always wlsxx/bin/stop-wl.sh and start-wl.sh

here's the versions i have:
Redhat Linux 7.3
Apache 1.3.27
Tomcat 4.03
J2SDK 1.4.0

thanks!
0
Comment
Question by:gagaliya
  • 3
5 Comments
 
LVL 8

Expert Comment

by:HaydnH
Comment Utility

    1) Somebody else will have to answer this - I haven't deployed a servlet in years as I've done all my stuff in php recently.

    2) If I remember correctly, as tomcat is a module of apache you only need to restart apache, somebody else can confirm
        this.

        You'll probably find the apache bin's in:

            /usr/local/apache/bin

        ...and the command to restart apache is:

            ./apachectl restart

Haydn.
0
 
LVL 15

Accepted Solution

by:
samri earned 250 total points
Comment Utility
in order for you to be able to restart the apache, you would need to have sufficient privelege.  In most cases, by default apache would be run as root (then the subsequest child process would suid to whatever User directive is set to (chances are either apache or nobody, and maybe httpd).  So in this case, you may need to be root or root-equivalent.


If you are not modifying the httpd.conf (aka. apache configuration file), you would not require to restart the service.

since you already have the "power" to restart tomcat, I would think (IMHO), that would be sufficient.

The best option to go at this moment, is that try to restart only tomcat, and test if the newly added application registers.  

cheers.
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
try to download the file to the machine you had the apache running.  and try to install with apxs.

I would check the docs on that... (gee... the last time I did stuff like this is like almost a few years back! :)
0
 
LVL 1

Author Comment

by:gagaliya
Comment Utility
hey thanks for the responses,

"The best option to go at this moment, is that try to restart only tomcat, and test if the newly added application registers."

but how do i restart tomcat?

"If you are not modifying the httpd.conf (aka. apache configuration file), you would not require to restart the service."

so are you using all i need to do to deploy a servlet is jsut create the web.xml with the servlet in it, and that's it?

thanks
0
 
LVL 15

Expert Comment

by:samri
Comment Utility
i could not give you a 110% confirmation;  you could take a look at the following Tomcat-docs which should give you some instruction on what needs to be done once you had a new apps deployed.

http://jakarta.apache.org/tomcat/tomcat-4.0-doc/index.html
http://jakarta.apache.org/tomcat/tomcat-4.0-doc/manager-howto.html

For a more general Tomcat stuff : http://jakarta.apache.org/tomcat/

hope this would give you some idea.

Cheers.
0

Featured Post

Complete Microsoft Windows PC® & Mac Backup

Backup and recovery solutions to protect all your PCs & Mac– on-premises or in remote locations. Acronis backs up entire PC or Mac with patented reliable disk imaging technology and you will be able to restore workstations to a new, dissimilar hardware in minutes.

Join & Write a Comment

Over the last year I have answered a couple of basic URL rewriting questions several times so I thought I might as well have a stab at: explaining the basics, providing a few useful links and consolidating some of the most common queries into a sing…
In Solr 4.0 it is possible to atomically (or partially) update individual fields in a document. This article will show the operations possible for atomic updating as well as setting up your Solr instance to be able to perform the actions. One major …
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now