Axa Assurance Maroc - Insurer Innovation Award 2024
Apache2 BootCamp : Getting Started With Apache
1. #4
Day #2
Getting Started with Apache
Wildan Maulana
wildan.m@openthinklabs.com
http://workshop.openthinklabs.com
2. Overview
● The steps necessary to have a minimal Apache
installation up and running; for example,
changing basic server properties such as name
and port information
● How to start and stop Apache and how to
troubleshoot basic problems
3. Layout of Server Files and
Directories
Section Windows Unix
Default install path C:Program FilesApache /usr/local/apache2
GroupApache2
Binaries and support bin/apache.exe bin/httpd
scripts bin/ bin/
Log files log/error.log log/error_log
log/access.log log/access_log
log/httpd.pid log/httpd.pid
Proxy proxy/ proxy/
Configuration files conf/httpd.conf conf/httpd.conf
CGI scripts cgi-bin/test-cgi.bat cgi-bin/test-cgi
Build information and Does not apply in binary Include/
header files installation build/
4. Layout of Server Files and
Directories (2)
Section Windows Unix
Error messages error/ error/
Modules and libraries modules/ modules/
bin/ lib/
HTML documents htdocs/ htdocs/
Icons icons/ icons/
Manual manual/ manual/
5. Configuration Files Structure
● Directives
Directives configure specific settings of Apache, such as
authorization, performance, and network parameters.
● Containers
Containers specify the context to which those settings
refer. For example, authorization configuration can refer to
the server as a whole, a directory, or a single file.
8. Conditional Evaluation (2)
<IfModule prefork.c>
Directives in an IfModule StartServers 5
section will be processed MinSpareServers 5
only if the module MaxSpareServers 10
passed as an argument is present MaxClients 20
in the Web server MaxRequestsPerChild 0
</IfModule>
<IfModule worker.c>
StartServers 3
MaxClients 8
MinSpareThreads 5
MaxSpareThreads 10
ThreadsPerChild 25
MaxRequestsPerChild 0
</IfModule>
9. ServerRoot
● The ServerRoot directive takes a single
argument: a directory path pointing to the
directory where the server lives
ServerRoot /usr/local/apache
15. Controlling Apache on Windows
● Apache.exe -k restart : Tells Apache to restart
● Apache.exe -k graceful: Tells Apache to do a
graceful restart
● Apache.exe -k stop: Tells Apache to stop
16. Troubleshooting
● Existing Web Server
● No Permission to Bind to Port
● Access Denied
● Wrong Group Settings