Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
tighar:apache [2009/07/05 19:21]
moleski
tighar:apache [2017/07/13 20:33] (current)
Line 1: Line 1:
 +====== vocabulary ======
 +
 +"​httpd"​ is a synonym for "the Apache server in linux." ​ It stands for "http daemon,"​ which is a piece of software that is always running in the background, watching and waiting for requests made through the <​nowiki>​http://</​nowiki>​ protocol. ​ [[http://​www.apache.org/​|Apache]] is just one flavor of //httpd//, but it is extremely popular and successful.
 +
 +====== Sundry commands ======
 +
 +<​code>​
 +/​etc/​httpd/​conf/​conf.d/​ # an important Apache startup directory
 +/​etc/​httpd/​conf/​httpd.conf #  Apache configuration file.
 +
 +/​var/​www/​html # root of documents served by Apache
 +
 +apachectl
 +apachectl -M
 +apachectl configtest # test the syntax in the configuration file
 +apachectl graceful # restart Apache gracefully
 +
 +httpd -t # same as apachectl configtest
 +httpd -v # short version
 +httpd -V # Verbose information about compilation
 +httpd -l # list compiled-in modules
 +httpd -M # list loaded modules
 +
 +service httpd start
 +service httpd restart
 +httpd
 +httpd -k stop
 +httpd
 +
 +ps -ef |grep httpd # find out whether httpd is running
 +
 +</​code>​
 +
 +===== standard apache setup on linux =====
 +<​code>​
 +
 +ServerRoot ​             ::      /etc/httpd
 +Primary Config Fle      ::      /​etc/​httpd/​conf/​httpd.conf
 +DocumentRoot ​           ::      /​var/​www/​html
 +ErrorLog ​               ::      /​var/​log/​httpd/​error_log
 +AccessLog ​              :: ​     /​var/​log/​httpd/​access_log
 +cgi-bin ​                :: ​     /​var/​www/​cgi-bin (empty and disabled by default)
 +binary ​                 ::      /​usr/​sbin/​httpd
 +start/​stop ​             ::      /​sbin/​service httpd 
 +
 +{start|stop|restart|condrestart|reload|status|fullstatus|graceful|help|configtest}
 +
 +</​code>​
 +
 +====== /​var/​www/​html ======
 +This is the **document root**--where all browser-accessible files are kept.  When someone puts [[http://​tighar.org]] into their browser, they arrive at /​var/​www/​html/​ on our system. ​ Their browser cannot access anything above that folder.
 +<​code>​
 +chown apache:​apache html
 +chmod -R 775 html
 +</​code>​
 +
 +====== .cgi support ======
 +
 +In /​etc/​httpd/​conf/​httpd.conf:​
 +#
 +# MXM: added for scripts
 +#
 +
 +<​Directory "/​var/​www/​html/​cgi-local">​
 +    AllowOverride None
 +    Options +ExecCGI
 +    Order allow,deny
 +    Allow from all
 +</​Directory> ​
 +
 +#
 +# MXM: uncommented following line, added .pl
 +#
 +AddHandler cgi-script .cgi .pl
 +
 +====== .htaccess support ======
 +
 +In /​etc/​httpd/​conf/​httpd.conf:​
 +#
 +# MXM: Changed from None to AuthConfig to protect "​protected"​ folder
 +#
 +    AllowOverride AuthConfig
  
 
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki