pavement

Apache, Controlling

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(minor updates)
m (Reverted edits by DavidYoung (talk) to last revision by 200.38.30.168)
 
(2 intermediate revisions by 2 users not shown)
Line 44: Line 44:
  
 
[[Category:Common Tasks]]
 
[[Category:Common Tasks]]
 
== 9 Reasons Why You Should No Longer Care About Peoples Approval ==
 
 
A truly strong person does not need the approval of others any more than a lion needs the approval of sheep. Vernon HowardApproval Seeking Behavior If you ask me, this is where many of our challenges start. When you are too concerned with what other people think of you, you start sabotaging your life, and you start moving forward but with the breaks on.
 
 
[[http://goodvillenews.com/9-Reasons-Why-You-Should-No-Longer-Care-About-Peoples-Approv-oy6.html 9 Reasons Why You Should No Longer Care About Peoples Approval]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== How to Think Like an Ecosystem ==
 
 
Gradually its dawned on me: We humans are creatures of the mind. We perceive the world according to our core, often unacknowledged, assumptions. They determine, literally, what we can see and what we cannot. Nothing so wrong with that, perhapsexcept that, in this crucial do-or-die moment, were stuck with a mental map that is life-destroying.
 
 
[[http://goodvillenews.com/How-to-Think-Like-an-Ecosystem-YZEJSQ.html How to Think Like an Ecosystem]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Bangladesh rickshaw puller starts clinic for the poor ==
 
 
Joynal Abedin still remembers the rainy and windy night when he saw his father die because there was no medical treatment. His village in the northern Mymensingh district of Bangladesh did not have any medical facility at that time, and the nearest hospital was about 20km (12 miles) away.
 
 
[[http://goodvillenews.com/Bangladesh-rickshaw-puller-starts-clinic-for-the-poor-0zbEXF.html Bangladesh rickshaw puller starts clinic for the poor]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== Not Your Usual Panhandler ==
 
 
Doug Eaton wanted to celebrate his birthday on June 11 in a big way, so he turned to his friends for ideas -- ended up marking the day with random acts of kindness, including handing out free money to people passing by.
 
 
[[http://goodvillenews.com/Not-Your-Usual-Panhandler-6kQtGi.html Not Your Usual Panhandler]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 
 
== The Secret to Success Kindness ==
 
 
Take a look at these simple but powerful words from the Dalai Lama, Kindness and a good heart are the foundation for success in this life, progress on the spiritual path, and the fulfillment of our aspirations. Our need for them is not limited to any specific time, place, society, or culture.
 
 
[[http://goodvillenews.com/The-Secret-to-Success-Kindness-qClIIA.html The Secret to Success Kindness]]
 
 
[[http://goodvillenews.com/wk.html GoodvilleNews.com - good, positive news, inspirational stories, articles]]
 

Latest revision as of 16:30, 25 August 2012

Want to see if it works? If you just got done installing Apache, first of all, issue a rehash command to reindex your system's PATH. Then let's get started:

ph34r# apachectl start
/usr/local/sbin/apachectl start: httpd started

Don't take its word for it, though - sometimes apachectl lies through its teeth. Let's make sure we really do have some httpd processes running:

ph34r# ps ax | grep http
18564  ??  SsJ    0:00.74 /usr/local/sbin/httpd
18566  ??  IJ     0:02.71 /usr/local/sbin/httpd
18567  ??  IJ     0:01.12 /usr/local/sbin/httpd
18568  ??  IJ     0:00.64 /usr/local/sbin/httpd
18569  ??  IJ     0:02.10 /usr/local/sbin/httpd
18570  ??  IJ     0:06.16 /usr/local/sbin/httpd
18612  ??  IJ     0:03.00 /usr/local/sbin/httpd
18621  ??  IJ     0:03.94 /usr/local/sbin/httpd
18639  ??  IJ     0:05.96 /usr/local/sbin/httpd
18644  ??  IJ     0:01.60 /usr/local/sbin/httpd
18645  ??  IJ     0:02.05 /usr/local/sbin/httpd

Okay, good, looks kosher. You're probably going to want Apache to run automatically whenever the server boots, though, right? Well, there are two ways to go about doing that. One way is to edit /etc/rc.conf and set some variables that will then cause the default apache.sh / apache2.sh startup script that the port placed in /usr/local/etc/rc.d to actually do something when the machine starts... but we're not going to talk about that way, because I personally despise forcing the administrator to maintain two files where one would do. So instead, we're just going to write our own script for /usr/local/etc/rc.d that will start Apache all on its lonesome, regardless of what is or isn't in /etc/rc.conf. So make yourself a new script and name it /usr/local/etc/rc.d/apache.sh, and make it look like this:

#!/bin/sh

case "$1" in
start)
        /usr/local/sbin/apachectl start > /dev/null && echo -n ' apache'
        ;;
stop)
        /usr/local/sbin/apachectl stop > /dev/null && echo -n ' apache'
        ;;
*)
        echo "Usage: `basename $0` {start|stop}" >&2
        ;;
esac

exit 0

Now you'll want to make sure that your new script 1. can get executed when the system starts, and 2. won't get clobbered the next time you upgrade Apache from the ports tree, so make it executable but NOT writeable:

ph34r# chmod 555 /usr/local/etc/rc.d/apache.sh

There you go - now that you've got a handle on starting and stopping Apache, move on to the basics of Configuring Apache.

Personal tools