Visit Our UNIX and Linux User Community


Webpage Display


 
Thread Tools Search this Thread
Operating Systems Solaris Webpage Display
# 1  
Old 09-03-2013
Webpage Display

Hi,
I need to display the output of a script in web page. Can anyone suggest me how to do that?
# 2  
Old 09-03-2013
Just have the script out saved to /var/apache2/htdocs. You probably want to make sure apache is running too.

Last edited by DustinT; 09-03-2013 at 03:21 PM..
# 3  
Old 09-03-2013
Network

Quote:
Originally Posted by Arasu
Hi,
I need to display the output of a script in web page. Can anyone suggest me how to do that?
What script? PHP? CGI? Javascript?
# 4  
Old 09-04-2013
Its just a Unix shell script Smilie It contains the CPU Utilisation, Memory and disk usage,etc. We need to redirect the output to a web page.

---------- Post updated at 03:53 PM ---------- Previous update was at 03:23 PM ----------

Just have the script out saved to /var/apache2/htdocs. You probably want to make sure apache is running too.

Hi,
How can i check whether apache server is running. I checked the directory u have mentioned and it exists. Can you please explain little more clear what to do?
# 5  
Old 09-04-2013
Here is an example creating an HTML page for the date using bash:

Code:
#!/bin/bash
DATE="$(date)"
OUTPUT=$OUTPUT"<html><head>\n"
OUTPUT=$OUTPUT"<title>Demo HTML for Date</title>\n"
OUTPUT=$OUTPUT"</head><body>\n"
OUTPUT=$OUTPUT"Today is $DATE <br>\n"
OUTPUT=$OUTPUT"</body></html>\n"
printf "$OUTPUT " > /tmp/date.html

You can use the ps and the grep command to see if a process is running...
This User Gave Thanks to Neo For This Post:
# 6  
Old 09-04-2013
Quote:
Originally Posted by Arasu
Its just a Unix shell script Smilie It contains the CPU Utilisation, Memory and disk usage,etc. We need to redirect the output to a web page.

How can i check whether apache server is running. I checked the directory u have mentioned and it exists. Can you please explain little more clear what to do?
Current status of the apache service.
Code:
svcs -p /network/http:apache2

Start the apache service and have it automatically restart if the system if rebooted.
Code:
svcadm -v enable /network/http:apache2

Note, BEFORE you start apache, make sure you've got a valid httpd.conf file.
Code:
cd /etc/apache2
cp httpd.conf-example httpd.conf

That's the default. It's not very secure but it will get the job done for internal use.

That should get you started... Post back if you have any questions.
This User Gave Thanks to DustinT For This Post:

Previous Thread | Next Thread
Test Your Knowledge in Computers #410
Difficulty: Easy
Trusted XENIX was a variant initially developed by HP-UX, under the name Secure XENIX.
True or False?

9 More Discussions You Might Find Interesting

1. Web Development

Display received sms on webpage - php

Hello, Scenario: Send sms from putty and display it on webpage. I have rented an short message service from a company and set callback url to my vps. PHP is installed in my vps . my mobile phone is: ********85** receipent mobile phone is: 49********* callback url is redirected to... (0 Replies)
Discussion started by: baris35
0 Replies

2. Shell Programming and Scripting

Nagios chomping webpage

Hello Gurus Am facing situation to chomp webpage and get the values from in it and that value need to monitor by nagios . could you advise me how i can achieve this task . Thanks (1 Reply)
Discussion started by: Salim_Linux
1 Replies

3. Shell Programming and Scripting

Navigating a WebPage with Perl

Hi All Below is Code, It opens a link from which it ask a login name and password, the script enter the login name and password and navigate to next page.. In the next page there is a drop down box from which i have to select a value, I have written the code but it gives error #!/usr/bin/perl... (3 Replies)
Discussion started by: parthmittal2007
3 Replies

4. Shell Programming and Scripting

Help with opening webpage with IP#

Hi, I would like to open a webpage from an IP# from a file. Lets say I findout an IP address from using grep grep John remotecomputers.txt result: 192.168.2.1 Then after that I would like to increment the IP# to 192.168.2.2 from 192.168.2.1 After that I woud like to launch mozilla or... (2 Replies)
Discussion started by: tthach830
2 Replies

5. UNIX for Dummies Questions & Answers

Access Webpage in UNIX

Dear All, I do not know anything from UNIX and its systems. I have a course on bioinformatics and they taught us a little about the UNIX. They also provided a userID and password for the web server which I can access using SSH. now, with A LOT OF EFFORT, I wrote a small index.html file, saved it... (1 Reply)
Discussion started by: dreamer0085
1 Replies

6. Programming

Webpage size with Java

Hi.. I need to know the size in bytes of a webpage!! For example I have this link The UNIX and Linux Forums - Learn UNIX and Linux from Experts and then... URL u = new URL("https://www.unix.com"); There is any Java Class that can help me?? P.s. sorry for my english... :D (6 Replies)
Discussion started by: prompt
6 Replies

7. Linux

use of FTP in webpage

Please help me to start with this trek... What are the steps for me to implement at FTP functionality on my web page... we have a linux box as our proxy server... (0 Replies)
Discussion started by: shiny
0 Replies

8. IP Networking

Where is the Default Webpage

I have SCO OpenServer 5 connected to the Internet and I would like to change the webpage that appears when I try from another computer the address: http://192.1xx.xx.xx. If I try this, a page about SCO appears, but I don't know where can I find it. Thanks:cool: (1 Reply)
Discussion started by: SuPeRbYtE
1 Replies

9. UNIX for Dummies Questions & Answers

webpage

Hi I was wondering how do I make my own webpage??? :rolleyes::confused: (4 Replies)
Discussion started by: babysoft19
4 Replies

Featured Tech Videos