Solved

How can I test if the webserver is running?

Posted on 2001-06-14
12
221 Views
Last Modified: 2013-12-27
Are there any commands to test if the web server is running? (in case which I don't have any web browser)
I think there are commands get //HTTP:// but I'm
not sure or any other commands?
0
Comment
Question by:vage78
  • 3
  • 2
  • 2
  • +3
12 Comments
 
LVL 4

Expert Comment

by:besky
ID: 6192758
You could check the process, depending on what version of Solaris use:

For Solaris 7-8.  pgrep -lf httpd (or what the procs name is, you can see all processes with prstat and determine the name)

For other versions.  ps -ef |grep httpd
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 6192858
Hi,

two ways of the top of my head:

1. Check if the process is running

ps -ef | grep http

2. Try to connect to the web server:

e.g. if the web server is running on port 80 on the localhost

telnet localhost 80
get /index.html

Regards, Nisus
http://www.omnimodo.com
0
 
LVL 1

Expert Comment

by:shanechambers
ID: 6196300
If you want to continually check to make sure the web server, is serving pages (and not just running in a hung state), try BigBrother (http://bb4.com/).

It's completely customizable to monitor different services on a system, including web pages.
0
 

Author Comment

by:vage78
ID: 6198632
Hi shanechambers
Is there any version in Windows 95 or 98?
0
 
LVL 1

Expert Comment

by:shanechambers
ID: 6198694
It looks like they support WinNT, but not 95, or 98.  (keep in mind, you don't have to be on a Unix box to check the status of things, that's just where the main program runs from, it exports all it's findings out to a web page)


I've seen some striped down clients for MS Windows, but I can't name them off the top of my head.

If you're looking windows softwhare, why not post over in that area?
0
 

Author Comment

by:vage78
ID: 6200989
Hi nisus
I test it but I receive the following message

<TITLE>Not Found</TITLE><H1>Not Found</H1> The requested object does not exist o
n this server. The link you followed is either outdated, inaccurate, or the serv
er has been instructed not to let you have it.    
What can I do?                    
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 5

Expert Comment

by:Droby10
ID: 6203387
if you get a response, then the server is running...if you want actual content, try using / instead index.html...it will default to the default page or provide a directory list if the default page does not exist...or give a permission denied if you don't allow directory browsing.

GET / HTTP/1.0

0
 
LVL 5

Expert Comment

by:Droby10
ID: 6203394
optionally if you're verifying that a particular virtual site is configured...

GET / HTTP/1.0
Host: www.mydomain.com


where www.mydomain.com is the fqdn of the virtual domain.
0
 
LVL 3

Accepted Solution

by:
graf27 earned 10 total points
ID: 6206807
i try:

telnet hostname port
GET /index.html HTTP/1.0(carriage return, carriage return)

example:
telnet localhost 80


where the 2 carriage-returns ar important!

if the telnetcommand fails, the server is not running. otherwise you get an error, wich normaly explains the reason. Than the web-server is running!
0
 

Author Comment

by:vage78
ID: 6209148
Hi graf27 T try but it gives me the following :HTTP/1.1 500 Server Error
Server: Netscape-Enterprise/3.0C
Date: Wed, 20 Jun 2001 05:06:23 GMT
Content-length: 305
Content-type: text/html

<HTML><HEAD><TITLE>Server Error</TITLE></HEAD>
<BODY><H1>Server Error</H1>
This server has encountered an internal error which prevents it from fulfilling
your request. The most likely cause is a misconfiguration. Please ask the admini
strator to look for messages in the server's error log.
</BODY></HTML>Connection closed by foreign host.
                               
0
 
LVL 3

Expert Comment

by:graf27
ID: 6209776
great, than your webserver is running and produce an internal error shortly explained in your error-message as "misconfiguration". So you must verfiy the exactly reason in the log-files. With Apache, I got  the internal Error when I changed something incorrect of the JAVA-Environment from the Web-Server.
0
 
LVL 5

Expert Comment

by:Nisus091197
ID: 6210411
Hi,

When you telnet to port 80 you should 'get' some page.  If your default page is 'index.htm', 'default.asp', 'index.jsp' or whatever, then 'get' that page.

Your default page may be in a subdirectory, in which case you should 'get' the path/default page.

What is a good page to check for?

Regards, Nisus.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Error while installing rpm 1 77
Shell script errors 10 113
need to remove or skip  grub protection password in ubuntu on boot time 2 63
Martian Packets Unix 5 30
Let's say you need to move the data of a file system from one partition to another. This generally involves dismounting the file system, backing it up to tapes, and restoring it to a new partition. You may also copy the file system from one place to…
FreeBSD on EC2 FreeBSD (https://www.freebsd.org) is a robust Unix-like operating system that has been around for many years. FreeBSD is available on Amazon EC2 through Amazon Machine Images (AMIs) provided by FreeBSD developer and security office…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

912 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

21 Experts available now in Live!

Get 1:1 Help Now