LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   bash scripting and apache (https://www.linuxquestions.org/questions/linux-newbie-8/bash-scripting-and-apache-872786/)

athrin 04-03-2011 08:54 PM

bash scripting and apache
 
can someone help me on how to combine bash scripting with apache.
please me the steps..

ted_chou12 04-03-2011 09:07 PM

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?

athrin 04-03-2011 09:19 PM

Quote:

Originally Posted by ted_chou12 (Post 4312906)
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

ted_chou12 04-03-2011 10:05 PM

search for php5-cgi package, you need cgi server enabled to get bash script working I think.

athrin 04-03-2011 10:45 PM

Quote:

Originally Posted by ted_chou12 (Post 4312944)
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

peonuser 07-27-2011 11:24 AM

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


All times are GMT -5. The time now is 10:40 AM.