This document provides instructions for installing and configuring Apache2 on Ubuntu. It discusses updating system packages, installing Apache2 packages, starting/stopping the Apache2 service, reloading configurations, important configuration files and directories, global configuration attributes like ServerName and Listen directives, the default virtual host configuration in sites-available, virtual host directives and their purposes, defining a virtual host with directives like ServerAdmin and DocumentRoot, enabling and disabling modules and sites, and managing Apache2 modules and sites.
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...MongoDB
MongoDB and Red Hat have collaborated to deliver an integrated solution for securing MongoDB deployments. Red Hat's proven security infrastructure adds extra protection to MongoDB with standards-based identity management featuring centralization of user, password, and certificate information. MongoDB and Red Hat team members present what you need to know to secure your systems, including an overview of Red Hat's Identity Management in Red Hat Enterprise Linux and MongoDB-RHEL security architecture.
NETWORK SECURITY USING LINUX INTRUSION DETECTION SYSTEMIJORCS
Attacks on the nation’s computer infrastructures are becoming an increasingly serious problem. Firewalls provide a certain amount of security, but can be fooled at times by attacks like IP spoofing and the so called authorized users. So an intelligent system that can detect attacks and intrusions is required. The tool GRANT (Global Real-time Analysis of Network Traffic) being a Linux based Intrusion Detection System(LIDs), takes the advantage of the security of a Linux box and secures the other nodes in the perimeter of the network. It is capable of detecting intrusions and probes as and when they occur and capable of responding to “already” successful attacks, thus causing minimal or no damage to the entire network. For better performance, this Linux Intrusion Detection System should be part of a defense in depth strategy such as Firewall and Intrusion Prevention.
Securing Your Deployment with MongoDB and Red Hat's Identity Management in Re...MongoDB
MongoDB and Red Hat have collaborated to deliver an integrated solution for securing MongoDB deployments. Red Hat's proven security infrastructure adds extra protection to MongoDB with standards-based identity management featuring centralization of user, password, and certificate information. MongoDB and Red Hat team members present what you need to know to secure your systems, including an overview of Red Hat's Identity Management in Red Hat Enterprise Linux and MongoDB-RHEL security architecture.
NETWORK SECURITY USING LINUX INTRUSION DETECTION SYSTEMIJORCS
Attacks on the nation’s computer infrastructures are becoming an increasingly serious problem. Firewalls provide a certain amount of security, but can be fooled at times by attacks like IP spoofing and the so called authorized users. So an intelligent system that can detect attacks and intrusions is required. The tool GRANT (Global Real-time Analysis of Network Traffic) being a Linux based Intrusion Detection System(LIDs), takes the advantage of the security of a Linux box and secures the other nodes in the perimeter of the network. It is capable of detecting intrusions and probes as and when they occur and capable of responding to “already” successful attacks, thus causing minimal or no damage to the entire network. For better performance, this Linux Intrusion Detection System should be part of a defense in depth strategy such as Firewall and Intrusion Prevention.
This will discuss about the Linux configuration audit, Configuration audit is like CIS Benchmark audit,This Presentation i had presented at NUll Mumbai chapter on October 10 2015
University of Virginia
cs4414: Operating Systems
http://rust-class.org
Scheduling in Linux, 2002-2014
Energy and Scheduling
OSX Mavericks Timer Coalescing
Scheduling Web Servers
Healthcare.gov
For embedded notes, see: http://rust-class.org/class-12-scheduling-in-linux-and-web-servers.html
Talk given by Ryan Michela, Principal Software Engineer at Salesforce, at Silicon Valley Code Camp on October 2016
The Git distributed version control system is basically magic. It tracks all your files, branches, merges, and changes. You can work online, offline, with or without a central server. Git has unlocked the power of distributed teams and become one of the foundational technologies of modern software development. Yet how does it work? In this presentation we deep dive into the hidden internals of the Git distributed version control system to find out how they really work. We will start with the history of Git - where it came from and how it came to be. Then we will cover how Git represents objects in it's data store, and what is really going on in your .git directory. Next we will break down a commit and look at how Git represents your commit history. Finally, we will take a look at branching and merging, including what really happens when you rebase a branch. By the end you will be a Git wizard, able to see through the magic and control it for yourself.
Nagios is a powerful monitoring system that enables organizations to identify and resolve IT infrastructure problems before they affect critical business processes.
Nagios Conference 2013 - Sam Lansing - Getting Started With Nagios XI, Core, ...Nagios
Sam Lansing's presentation on Getting Started With Nagios XI, Core, and Fusion.
The presentation was given during the Nagios World Conference North America held Sept 20-Oct 2nd, 2013 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna
Debugging LAMP Apps on Linux/UNIX Using Open Source Tools - Jess Portnot - OS...Zohar Babin
OSCON 2014 tutorial workshop lead by Jess Portnoy (@jess_port01) covering the use of various useful debugging tools, both general and specific to web apps.
It focuses on PHP based apps but vast parts of it are useful for other commonly used open sourced, interpreted languages.
Covering tools such as
1. GDB [for debugging the PHP engine and extensions, written in C/C++]
2. Xdebug [for debugging PHP code]
3. Shell utilities for better inspection of error and access logs such as ccze, efficient use of grep,sed.
4. Tracing processes with strace and more.
The session also featured several, real life examples such as:
1. A PHP extension causing seg faults
2. Reviewing Apache access and error logs to discover bad VHost configurations and rewrite rules
3. Various badly set PHP directives causing malfunctions
4. Debugging PHP code using Xdebug
Participants took part in the debugging process, and were asked to make suggestions as to how to advance and be prompted to share cases they’ve had, solved or did solve.
Nagios Conference 2011 - Nate Broderick - Nagios XI Large Implementation Tips...Nagios
Nate Broderick's presentation on Nagios XI large implementation tips and tricks. The presentation was given during the Nagios World Conference North America held Sept 27-29th, 2011 in Saint Paul, MN. For more information on the conference (including photos and videos), visit: http://go.nagios.com/nwcna
s the culmination of ten years' work, the Samba Team has created the first compatible Free Software implementation of Microsoft’s Active Directory protocols.
LDAP, Kerberos, DNS, and all other essential services that are required for Active Directory are natively supported by Samba4.
Samba4 doesn't have only Active Directory functions, but it has also many other incredible features like smb3 protocol implementation, ctdb (cluster) functionality and much more.
The presentation will describe the supported scenarios of Samba 4 as an Active Directory DC and also, discusses the developments in the File Server, in particular the components of SMB2, SMB3 and CTDB.
This is an enterprise plugin to get information status on Apache by using the status module. It uses perl and wget to grab the information. For more information visit the following web page: http://pandorafms.com/index.php?sec=Library&sec2=repository&lng=en&action=view_PUI&id_PUI=270
Smart TV Buyer Insights Survey 2024 by 91mobiles.pdf91mobiles
91mobiles recently conducted a Smart TV Buyer Insights Survey in which we asked over 3,000 respondents about the TV they own, aspects they look at on a new TV, and their TV buying preferences.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
"Impact of front-end architecture on development cost", Viktor TurskyiFwdays
I have heard many times that architecture is not important for the front-end. Also, many times I have seen how developers implement features on the front-end just following the standard rules for a framework and think that this is enough to successfully launch the project, and then the project fails. How to prevent this and what approach to choose? I have launched dozens of complex projects and during the talk we will analyze which approaches have worked for me and which have not.
Let's dive deeper into the world of ODC! Ricardo Alves (OutSystems) will join us to tell all about the new Data Fabric. After that, Sezen de Bruijn (OutSystems) will get into the details on how to best design a sturdy architecture within ODC.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
How to installation and configure apache2
1. How To - Apache2 Installation and Configuration
Contents
Overview.......................................................................................................................................................1
Applies To..................................................................................................................................................1
Update Operating System Patches ...........................................................................................................1
Install Apache2 Packages..........................................................................................................................1
Start / Stop / Restart Service ....................................................................................................................1
Reload Apache2 Configuration .................................................................................................................1
Important Configuration Files and Directories .............................................................................................2
Global Configuring Attributes .......................................................................................................................2
ServerName – FQDN.................................................................................................................................2
Listen – Default Port .................................................................................................................................3
Timeout.....................................................................................................................................................3
KeepAlive ..................................................................................................................................................3
MaxKeepAliveRequests.............................................................................................................................3
KeepAliveTimeout.....................................................................................................................................3
Default Virtual Host – Sites-Available...........................................................................................................4
Virtual Host Directives and Values............................................................................................................5
Virtual Host Port and Document Root Directives .................................................................................5
Directory Directive and Options for Root Folder..................................................................................5
Custom Directory Directive and Options ..............................................................................................5
Error Log Directive ................................................................................................................................5
Log Level, Custom Log Directive ...........................................................................................................5
Alias and Directory Directives...............................................................................................................6
Virtual Host – Definition & Directives...........................................................................................................6
<VirtualHost *:80> Directive.....................................................................................................................6
Virtual Host – ServerAdmin & DocumentRoot Directives ........................................................................6
<Directory /> - Directory Tag Directive.....................................................................................................6
Alias and ScriptAlias Directives .................................................................................................................7
Alias Doc....................................................................................................................................................8
Enabling Modules and Sites in Apache2.......................................................................................................9
Apache2 Managing Modules ....................................................................................................................9
Enabling Apache2 Module(s) ................................................................................................................9
2. How To - Apache2 Installation and Configuration
Disabling Apache2 Module(s) ...............................................................................................................9
Apache2 Managing Sites.........................................................................................................................10
Enabling Apache2 Site(s).....................................................................................................................10
Disabling Apache2 Site(s)....................................................................................................................10
3. How To - Apache2 Installation and Configuration
1 | P a g e
Overview
This guide will help in installing and configuration Apache2 on Ubuntu operating system, Apache is an
open source web server.
Applies To
ubuntu 12.04
To know the Ubuntu release execute the command
lsb_release -a
Update Operating System Patches
First and foremost thing is to update operating system with latest OS patches, to update the system
patches execute the update command.
sudo apt-get update
Install Apache2 Packages
In order to install Apache2, additional dependent packages have to installed, which also are specified in
the command below.
sudo apt-get install apache2 apache2-mpm-worker apache2-utils apache2.2-bin apache2.2-
common libapr1 libaprutil1 libaprutil1-dbd-sqlite3 libaprutil1-ldap
Start / Stop / Restart Service
To start, stop, restart the apache2 service, execute the commands accordingly
sudo service apache2 start
sudo service apache2 stop
sudo service apache2 restart
Reload Apache2 Configuration
To reload the configuration execute the command
sudo apache2 reload
4. How To - Apache2 Installation and Configuration
2 | P a g e
Important Configuration Files and Directories
File / Directory
Name
Purpose Type
apache2.conf
This is the main configuration file for the server.
Almost all configuration can be done.
It is recommended to use separate, designated files for simplicity.
This file will configure defaults and be the central point of access for the
server to read configuration details.
File
ports.conf
This file is used to specify the ports that virtual hosts should listen on.
Always ensure that, file is correct if you are configuring SSL. File
conf.d/
It’s used for controlling specific aspects of the Apache configuration.
It is often used to define SSL configuration and default security options. Directory
fqdn.conf This file is used to specify the fully qualified domain name. File
sites-available/
This directory contains all of the virtual host files that define different web
sites.
These will establish which content gets served for which requests.
These are available configurations, not active configurations.
Directory
sites-enabled/
This directory establishes which virtual host definitions are actually being
used.
Typically, this directory consists of symbolic links to files defined in the
"sites-available" directory.
Directory
mods-enabled
This directory is similar in function to the sites directories and modules
are enabled Directory
mods- available
This directory is similar in function to the sites directories and modules
that are available which could be enabled optionally. Directory
Global Configuring Attributes
ServerName – FQDN
The purpose of this setting is to configure “Server Name” of the web server, to add the entry execute the
below command.
echo "ServerName vcpubuntu.effonetech.com" | sudo tee /etc/apache2/conf.d/fqdn.conf
Note:
The above command will create the file and add the text <ServerName> <FQDN>
It will overwrite the existing content
5. How To - Apache2 Installation and Configuration
3 | P a g e
Listen – Default Port
The purpose of this setting is to modify the default listening port of the web server.
vi /etc/apache2/ports.conf
Listen 80
Timeout
The purpose of this setting is to configure the time out value of the request (send and receive).
By default, this parameter is set to "300"
vi /etc/apache2/apache2.conf
Timeout 300
KeepAlive
The purpose of this setting is to allow each connection to continue open to handle multiple request from
the same client; wherein it’s set to "On"
If this is setting is set to "Off", each request will have to establish a new connection, which would result
in significant overhead depending on your setup and traffic.
vi /etc/apache2/apache2.conf
KeepAlive On
MaxKeepAliveRequests
The purpose of this setting is to control how many separate request each connection will handle before
dying. Keeping this number high will allow Apache to serve content to each client more effectively.
Setting this value to 0 will allow Apache to serve an unlimited amount of request for each connection.
vi /etc/apache2/apache2.conf
KeepAliveRequest 0
KeepAliveTimeout
The purpose of this setting specifies how long to wait for the next request after finishing the last one. If
the timeout threshold is reached, then the connection will die.
Which means that the next time content is requested, the server will establish a new connection to handle
the request for the content that make up the page the client is visiting.
vi /etc/apache2/apache2.conf
KeepAliveTimeout 0
6. How To - Apache2 Installation and Configuration
4 | P a g e
Default Virtual Host – Sites-Available
Virtual host directive is required for name based virtual hosts, each directive have a definitive purpose.
Default configuration file is default
To edit the default configuration file, execute the command
sudo vi /etc/apache2/sites-available/default
Snippet:
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
# Possible values include: debug, info, notice, warn, error, crit, alert, emerg.
LogLevel warn
CustomLog ${APACHE_LOG_DIR}/access.log combined
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</VirtualHost>
7. How To - Apache2 Installation and Configuration
5 | P a g e
Virtual Host Directives and Values
Each and every directive plays a significant role in apache webserver behavior, hence configuring directive
is very crucial.
Virtual Host Port and Document Root Directives
This directive defines the virtual host’s port wherein the webpage would be severed with specific
document root associated to it.
<!--# Virtual Host Listening on port 80 -->
<VirtualHost *:80>
ServerAdmin webmaster@vcpubuntu.effonetech.com
DocumentRoot /var/www
Directory Directive and Options for Root Folder
This directive defines directory access with options and methods of access for the root directory.
<!--# Root Directory Options Configuration for a Virtual Host -->
<Directory />
Options FollowSymLinks
AllowOverride None
</Directory>
Custom Directory Directive and Options
In addition to the root directory access, custom directory access should also be set and configured
accordingly.
<!--# /var/www/ Directory options for a Virtual Host -->
<Directory /var/www/>
Options Indexes FollowSymLinks MultiViews
AllowOverride None
Order allow,deny
allow from all
</Directory>
Error Log Directive
Error log directive defines the error logs that would be written on to the file and its location.
<!--# Defines Error Log file Configuration for a Virtual Host -->
ErrorLog ${APACHE_LOG_DIR}/vcp_ubuntu_error.log
Log Level, Custom Log Directive
LogLevel and CustomLog directives defines the diffent types of logs that could be generated and its
associated log file.
<!--# Possible values include: debug, info, notice, warn, error, crit, alert, emerg. -->
LogLevel warn
8. How To - Apache2 Installation and Configuration
6 | P a g e
CustomLog ${APACHE_LOG_DIR}/vcp_ubuntu_access.log combined
Alias and Directory Directives
Alias directive defines mapping of URL alias to file system location and directory directive defines access
permissions and methods of access and accessibility from IP and subnet ranges to specific directory.
<!--# Alias Configuration - Virtual Host -->
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Virtual Host – Definition & Directives
<VirtualHost *:80> Directive
Default Virtual Host is configured to handle any request on port 80, the standard http port.
This is defined in the declaration header where it says "*:80", meaning port 80 on any interface.
This does not mean that it will necessarily handle each request to the server on this port however. Apache
uses the most specific Virtual Host definition that matches the request. This means that if there was a
more specific definition, it could supersede this definition.
Virtual Host – ServerAdmin & DocumentRoot Directives
Directive Purpose
ServerAdmin Define Server Administrator E-Mail ID
DocumentRoot Define Document Root Folder
<Directory /> - Directory Tag Directive
The first directory directive applies rules for the "/", or root, directory on the server.
This will provide the baseline configuration for your Virtual Host entry, as it applies to all files served on
the filesystem.
Note: Ubuntu does not set up any access restrictions to the filesystem by default. Though, Apache
recommends you to configure some default access restrictions.
9. How To - Apache2 Installation and Configuration
7 | P a g e
<Directory />
Options FollowSymLinks
AllowOverride None
Order Deny,Allow
Deny from All
</Directory>
Directive Purpose
<Directory /> Define Directory option, in this case its “/” – Starting Tag
Options FollowSymLinks Follow Symbolic Links in the directory; tells the web server to
follow the symbolic links.
This option permits Apache to follow Symbolic link directory.
AllowOverride None When this directive is set to None; then .htaccess files are
completely ignored
This option allows webserver to validate user access based on the
override option.
Order Deny,Allow Order deny, allow means that the deny rules are processed before
the allow rules.
If the client does not match the deny rule or it does match the allow
rule, then it will be granted access.
Deny from All Deny all requests by default
</Directory> Directory Options – Ending Tag
The above setting signifies
FollowSymLinks means if a directory is a symbol link, follow the link
It will deny access to all content unless specified otherwise in subsequent directory definitions.
The next directory definition is for the document root, so it specifies the "allow from all" option that
overrides the "/" option for this directory.
The "AllowOverride" option is used to decide whether an ".htaccess" file can override settings if it is
placed in the content directory. This is not allowed by default, but can be useful to enable in a variety of
circumstances.
"Order Deny, Allow" option means that deny rules would be processed before allow rules.
Alias and ScriptAlias Directives
Directory definitions are sometimes preceded by "Alias" or "ScriptAlias" statements. Alias maps a URL
path to a directory path.
ScriptAlias operates in the same way, but is used to define directories that will have executables.
Example:
This line in a Virtual Host that handles request to "f1tech.com" would allow access to content within
"/path/to/content/" by navigating to "http://f1tech.com/cgi-bin/":
Alias /cgi-bin/ /usr/lib/cgi-bin/
10. How To - Apache2 Installation and Configuration
8 | P a g e
Following the alias, always remember to define the directory with access privileges as defined in the
directory section.
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Allow from all
</Directory>
Directive Purpose
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ Define Script alias in the URL mapping and the actual
location of the script folder "cgi-bin" location
<Directory "/usr/lib/cgi-bin"> Define Directory option
AllowOverride None When this directive is set to None; then .htaccess files are
completely ignored
This option allows webserver to validate user access based
on the override option.
Options +ExeCGI -MultiViews
+SymLinksIfOwnerMatch
+ExeCGI is set, execution of CGI Script is permitted.
-MultiViews is not set, content negotiation is disabled.
+SymLinksIfOwnerMatch is set, server will only follow
symbolic links for which the target file or directory is owned
by the same user id as the link.
Order allow,deny Order deny, allow means that the deny rules are processed
before the allow rules.
If the client does not match the deny rule or it does match
the allow rule, then it will be granted access.
Allow from all Deny all requests by default
</Directory> Directory Options – Ending Tag
Alias Doc
Alias /doc/ "/usr/share/doc/"
<Directory "/usr/share/doc/">
Options Indexes MultiViews FollowSymLinks
AllowOverride None
Order deny,allow
Deny from all
Allow from 127.0.0.0/255.0.0.0 ::1/128
</Directory>
Directive Purpose
Alias /doc/ "/usr/share/doc/" Define doc alias in the URL mapping and the actual location
of the doc folder "doc" location
<Directory "/usr/share/doc/"> Define Directory option
11. How To - Apache2 Installation and Configuration
9 | P a g e
Options Indexes MultiViews
FollowSymLinks
Indexes enable indexing on the directory.
MultiViews is not set, content negotiation is enabled.
Follow Symbolic Links in the directory; tells the web server
to follow the symbolic links.
This option permits Apache to follow Symbolic link directory.
AllowOverride None When this directive is set to None; then .htaccess files are
completely ignored
This option allows webserver to validate user access based
on the override option.
Order deny, allow Order deny, allow means that the deny rules are processed
before the allow rules.
If the client does not match the deny rule or it does match
the allow rule, then it will be granted access.
Allow from all allow all requests by default
</Directory> Directory Options – Ending Tag
Enabling Modules and Sites in Apache2
After configuring and validating Virtual Host file according to requirements; enable the sites for the live
environment.
For creating a symbolic link automatically in the "sites-enabled" directory to an existing file in the "sites-
available" directory, execute the following command:
sudo a2ensite <virtual host file name>
Example: sudo a2ensite f1tech.com
After enabling a site, issue the following command to tell Apache to re-read its configuration files, allowing
the change to propagate:
sudo service apache2 reload
There is also a command for disabling a Virtual Host. It operates by removing the symbolic link from the
"sites-enabled" directory:
sudo a2dissite virtual_host_file_name
Again, reload the configuration changes are reflected execute; sudo service apache2 reload
Apache2 Managing Modules
Enabling Apache2 Module(s)
Modules can be enabled by executing command "sudo a2enmod".
Disabling Apache2 Module(s)
Modules can be enabled by executing command "sudo a2dismod".
12. How To - Apache2 Installation and Configuration
10 | P a g e
Apache2 Managing Sites
Enabling Apache2 Site(s)
Modules can be enabled by executing command "sudo a2ensite".
Disabling Apache2 Site(s)
Modules can be enabled by executing command "sudo a2dissite".