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 http:// protocol. Apache is just one flavor of httpd, but it is extremely popular and successful.

Sundry commands

/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

standard apache setup on linux

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}

/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.

chown apache:apache html
chmod -R 775 html

.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
 
tighar/apache.txt · Last modified: 2023/08/12 19:17 by 127.0.0.1
 
Recent changes RSS feed Creative Commons License Powered by PHP Valid XHTML 1.0 Valid CSS Driven by DokuWiki