LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-03-2011, 09:54 PM   #1
athrin
Member
 
Registered: Mar 2011
Posts: 135

Rep: Reputation: 1
bash scripting and apache


can someone help me on how to combine bash scripting with apache.
please me the steps..
 
Old 04-03-2011, 10:07 PM   #2
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Rep: Reputation: 2
apache is a package running on your machine, you can host php on it i think. where as bash script is more machine based, you can use bash to turn apache server on and off, but i am not sure what you mean by combining? can you be a bit more specific?

Last edited by Tinkster; 04-03-2011 at 10:09 PM. Reason: de-smsification; we try to speak English here.
 
Old 04-03-2011, 10:19 PM   #3
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ted_chou12 View Post
apache is a package running on your machine, you can host php on it i think. where as bash script is more machine based, you can use bash to turn apache server on and off, but i am not sure what you mean by combining? can you be a bit more specific?
err... i want to connect my apache or my web server with my bash script using linux command.. in other words.. i want to do a website using my bash scripting

Last edited by athrin; 04-03-2011 at 10:24 PM.
 
Old 04-03-2011, 11:05 PM   #4
ted_chou12
Member
 
Registered: Aug 2010
Location: Zhongli, Taoyuan
Distribution: slackware, windows, debian (armv4l GNU/Linux)
Posts: 421
Blog Entries: 28

Rep: Reputation: 2
search for php5-cgi package, you need cgi server enabled to get bash script working I think.
 
Old 04-03-2011, 11:45 PM   #5
athrin
Member
 
Registered: Mar 2011
Posts: 135

Original Poster
Rep: Reputation: 1
Quote:
Originally Posted by ted_chou12 View Post
search for php5-cgi package, you need cgi server enabled to get bash script working I think.
oh thanks..

example i want to display hostname like this
Code:
Host=`hostname`
echo "Hostname" '            ' " : $Host"
how to change this code into html? i want this code to be able to read on website
 
Old 07-27-2011, 12:24 PM   #6
peonuser
Member
 
Registered: Mar 2008
Location: Where ever I am.
Distribution: Various
Posts: 177
Blog Entries: 163

Rep: Reputation: 21
Look at my blog as I have a bash script that does exactly what you want. "uname -n" works better than "echo $Host".
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Reading a bash variable in bash scripting problem freeindy Programming 3 11-27-2008 03:29 AM
Need help with bash scripting Kleedrac Linux - Software 6 05-09-2006 03:55 PM
bash scripting -=MaGo=- Programming 16 08-30-2003 08:07 PM
Bash scripting kbeaver Programming 5 07-18-2003 09:35 PM
Bash scripting NSKL Linux - General 2 06-08-2002 01:10 PM


All times are GMT -5. The time now is 06:44 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration