<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:og="http://ogp.me/ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xmlns:schema="http://schema.org/" xmlns:sioc="http://rdfs.org/sioc/ns#" xmlns:sioct="http://rdfs.org/sioc/types#" xmlns:skos="http://www.w3.org/2004/02/skos/core#" xmlns:xsd="http://www.w3.org/2001/XMLSchema#" version="2.0" xml:base="https://www.linuxjournal.com/tag/apache">
  <channel>
    <title>Apache</title>
    <link>https://www.linuxjournal.com/tag/apache</link>
    <description/>
    <language>en</language>
    
    <item>
  <title>Breaking Up Apache Log Files for Analysis</title>
  <link>https://www.linuxjournal.com/content/breaking-apache-log-files-analysis</link>
  <description>  &lt;div data-history-node-id="1340584" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/bigstock-Laptop-Programming-Code-On-Sc-280677649_0.jpg" width="900" height="733" alt="""" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/dave-taylor" lang="" about="https://www.linuxjournal.com/users/dave-taylor" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Dave Taylor&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;&lt;em&gt;Dave tackles analysis of the ugly Apache web server log.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;
I know, in my last article I promised I'd jump back into the &lt;a href="https://www.linuxjournal.com/content/fun-mail-merge-and-cool-bash-arrays"&gt;mail merge
program&lt;/a&gt; I started building a while back. Since I'm having some hiccups
with my AskDaveTaylor.com web server, however, I'm going to claim
editorial privilege and bump that yet again.
&lt;/p&gt;

&lt;p&gt;
What I need to do is be able to process Apache log files and isolate
specific problems and glitches that are being encountered—a perfect use
for a shell script. In fact, I have a script of this nature that offers
basic analytics in my book &lt;em&gt;Wicked Cool Shell Scripts&lt;/em&gt; from
O'Reilly, but this is a bit more specific.
&lt;/p&gt;

&lt;h3&gt;
Oh Those Ugly Log Files&lt;/h3&gt;

&lt;p&gt;
To start, let's take a glance at a few lines out of the latest
log file for the site:

&lt;/p&gt;&lt;pre&gt;
&lt;code&gt;
$ head sslaccesslog_askdavetaylor.com_3_8_2019
18.144.59.52 - - [08/Mar/2019:06:10:09 -0600] "GET /wp-content/
↪themes/jumpstart/framework/assets/js/nivo.min.js?ver=3.2
 ↪HTTP/1.1" 200 3074
"https://www.askdavetaylor.com/how-to-play-dvd-free-windows-
↪10-win10/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
 ↪AppleWebKit/537.36 (KHTML, like Gecko) Chrome/
 ↪64.0.3282.140 Safari/537.36 Edge/18.17763 X-Middleton/1"
 ↪52.53.151.37 - - [08/Mar/2019:06:10:09 -0600] "GET
 ↪/wp-includes/js/jquery/jquery.js?ver=1.12.4 HTTP/1.1"
 ↪200 33766 "https://www.askdavetaylor.com/how-to-play
↪-dvd-free-windows-10-win10/" "Mozilla/5.0 (Windows NT
 ↪10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko)
 ↪Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763
 ↪X-Middleton/1" 18.144.59.52 - - [08/Mar/2019:06:10:09
 ↪-0600] "GET /wp-content/plugins/google-analytics-for-
↪wordpress/assets/js/frontend.min.js?ver=7.4.2 HTTP/1.1"
 ↪200 2544 "https://www.askdavetaylor.com/how-to-play
↪-dvd-free-windows-10-win10/"
 ↪"Mozilla/5.0 (Windows NT 10.0; Win64; x64)
 ↪AppleWebKit/537.36 (KHTML, like Gecko)
 ↪Chrome/64.0.3282.140 Safari/537.36 Edge/18.17763
 ↪X-Middleton/1"
&lt;/code&gt;
&lt;/pre&gt;


&lt;p&gt;
It's big and ugly, right? Okay, then let's just isolate a single entry to
see how it's structured:

&lt;/p&gt;&lt;pre&gt;
&lt;code&gt;
18.144.59.52 - - [08/Mar/2019:06:10:09 -0600] "GET
 ↪/wp-content/themes/jumpstart/framework/assets/js/
↪nivo.min.js?ver=3.2 HTTP/1.1" 200 3074
"https://www.askdavetaylor.com/how-to-play-dvd-free-windows-
↪10-win10/" "Mozilla/5.0 (Windows NT 10.0; Win64; x64)
AppleWebKit/537.36 (KHTML, like Gecko) Chrome/64.0.3282.140
 ↪Safari/537.36 Edge/18.17763 X-Middleton/1"
&lt;/code&gt;
&lt;/pre&gt;


&lt;p&gt;
That's still obfuscated enough to kick off a migraine!
&lt;/p&gt;

&lt;p&gt;
Fortunately, the &lt;a href="http://www.apache.org"&gt;Apache website&lt;/a&gt;
has a somewhat clearer
explanation of what's known as the custom log file format that's in
use on my server. Of course, it's described in a way that only a
programmer could love:

&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/breaking-apache-log-files-analysis" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Mon, 27 May 2019 11:00:00 +0000</pubDate>
    <dc:creator>Dave Taylor</dc:creator>
    <guid isPermaLink="false">1340584 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Integrating Web Applications with Apache</title>
  <link>https://www.linuxjournal.com/content/integrating-web-applications-apache</link>
  <description>  &lt;div data-history-node-id="1339469" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/computer-156951_640_1.png" width="501" height="600" alt="""" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/andy-carlson" lang="" about="https://www.linuxjournal.com/users/andy-carlson" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Andy Carlson&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;&lt;p&gt;
When you deploy a web application, how do end users access it?
Often web applications are set behind a gateway device through which
end users can access it. One of the popular products to act as
an application gateway on Linux is the Apache Web Server. Although it can
function as a normal web server, it also has the ability to connect through
it to other web servers.
&lt;/p&gt;
&lt;p&gt;
In this article, I discuss what it takes to
integrate a web application into Apache. This includes integrating the
HTTP protocol functionality, customizing content to render properly and
reusing pieces of configuration. Once you understand those basic bits of
functionality,
you'll have the tools you need to maximize your web applications'
usability. So, let's get started!
&lt;/p&gt;


&lt;h3&gt;
Crash Course in RegEx&lt;/h3&gt;

&lt;p&gt;
A mechanism that I use throughout this article that might need a brief
introduction is Regular Expressions (or regex). Regex is used to define
a text pattern to search for within a URL or to find and replace text
within content, such as HTML or JavaScript. The text processing command
&lt;code&gt;sed&lt;/code&gt; uses regex to do searches and substitutions.
&lt;/p&gt;

&lt;p&gt;
For each example
below there will be three parts: input, regex pattern and output.
The pattern will be applied to the input text and determine the value
of the output text.
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;Example 1:&lt;/em&gt;

&lt;/p&gt;&lt;pre&gt;
&lt;code&gt;
Input:
  Name: Frank Sinatra
  Genre: Jazz
  Name: 2Pac
  Genre: Rap
  Name: Reel Big Fish
  Genre: Ska

Regex pattern: "^Name: "

Output:
  Name: Frank Sinatra
  Name: 2Pac
  Name: Reel Big Fish
&lt;/code&gt;
&lt;/pre&gt;


&lt;p&gt;
This example searches the input text for text that matches
the pattern &lt;code&gt;"^Name: "&lt;/code&gt;. This pattern says, "Look for the text 'Name:
' at the beginning of each line." Since there are two lines that
begin with that text, only those two lines are returned. While
"^"
represents the beginning of a line, "$" represents the end of a line.
So if you were to apply the pattern "a$", two lines would be returned
(Frank Sinatra and Ska). Let's expand on that example and use
the input from Example 1 with a new pattern.
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;Example 2:&lt;/em&gt;

&lt;/p&gt;&lt;pre&gt;
&lt;code&gt;
Regex pattern: "^Name: [0-9]"

Output:
  Name: 2Pac
&lt;/code&gt;
&lt;/pre&gt;


&lt;p&gt;
As you can see, I've taken the original regex pattern and added
&lt;code&gt;[0-9]&lt;/code&gt;
to the end. This will search for a single character that can be any
number from 0 to 9, which is why "2Pac" was the only line
returned.
You also can specify a range with alphabetic characters
(&lt;code&gt;[a-z]&lt;/code&gt; or &lt;code&gt;[A-Z]&lt;/code&gt;).
&lt;/p&gt;

&lt;p&gt;
Along with pattern selection, you also can do
substitution with regex.
There are two formats for regex substitutions: s|pattern|replace|modifier
or s/pattern/replace/modifier. In Apache, I find it easier to use the
pipe-style substitution. Example 3 uses the same input
with a new pattern.
&lt;/p&gt;

&lt;p&gt;
&lt;em&gt;Example 3:&lt;/em&gt;

&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/integrating-web-applications-apache" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 22 Aug 2017 12:36:27 +0000</pubDate>
    <dc:creator>Andy Carlson</dc:creator>
    <guid isPermaLink="false">1339469 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Apache Web Servers and SSL Encryption</title>
  <link>https://www.linuxjournal.com/content/apache-web-servers-and-ssl-encryption</link>
  <description>  &lt;div data-history-node-id="1338713" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/GeekGuide-GeoTrust-ApacheSSL_cover-200.jpg" width="200" height="258" alt="Apache Web Servers and SSL Encryption" title="Apache Web Servers and SSL Encryption" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/carlie-fairchild" lang="" about="https://www.linuxjournal.com/users/carlie-fairchild" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Carlie Fairchild&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;Congratulations! You’ve decided to set up a Web site. The site might be for your personal use, for sharing family pictures, for a blog, for an SaaS application, or any number of other possibilities. In all of those cases, people will access your site using the Hypertext Transfer Protocol (HTTP). HTTP has evolved and improved through the years, but one thing about it hasn’t changed—the fact that all of the traffic sent ￼on an HTTP connection is unencrypted.
&lt;p&gt;
The bottom line is that whether you want or need to do so, adding HTTPS to a site you’re running isn’t very hard to do. In this Geek Guide, I walk through what SSL/TLS is (and isn’t), how you can create or buy a certificate, how to install that certificate into an Apache server and then how to configure Apache such that a subset of URLs on your system are covered by SSL.
&lt;/p&gt;&lt;p&gt;
&lt;a href="http://www.linuxjournal.com/geekguide-apache-ssl"&gt;Register to download&lt;/a&gt; our 25 page latest GeekGuide, &lt;a href="http://www.linuxjournal.com/geekguide-apache-ssl"&gt;Apache Web Servers and SSL Encryption&lt;/a&gt; by Reuven M. Lerner.&lt;/p&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/apache-web-servers-and-ssl-encryption" hreflang="und"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Tue, 12 May 2015 14:47:58 +0000</pubDate>
    <dc:creator>Carlie Fairchild</dc:creator>
    <guid isPermaLink="false">1338713 at https://www.linuxjournal.com</guid>
    </item>
<item>
  <title>Consolidate: Put Your Servers into a VirtualBox VM</title>
  <link>https://www.linuxjournal.com/content/consolidate-put-your-servers-virtualbox-vm</link>
  <description>  &lt;div data-history-node-id="1014337" class="layout layout--onecol"&gt;
    &lt;div class="layout__region layout__region--content"&gt;
      
            &lt;div class="field field--name-field-node-image field--type-image field--label-hidden field--item"&gt;  &lt;img src="https://www.linuxjournal.com/sites/default/files/nodeimage/story/virtualbox_ose.png" width="640" height="457" alt="" typeof="foaf:Image" class="img-responsive" /&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-node-author field--type-ds field--label-hidden field--item"&gt;by &lt;a title="View user profile." href="https://www.linuxjournal.com/users/michael-reed" lang="" about="https://www.linuxjournal.com/users/michael-reed" typeof="schema:Person" property="schema:name" datatype="" xml:lang=""&gt;Michael Reed&lt;/a&gt;&lt;/div&gt;
      
            &lt;div class="field field--name-body field--type-text-with-summary field--label-hidden field--item"&gt;Rather than installing a server, such as a web server, directly onto your main computer, why not install it in a VM? This sort of setup has a few advantages of security and convenience. These days, spreading resources out into the cloud is the in-thing, but consolidation is often underexploited. Hosting a server in a virtualizer such as VirtualBox is often a good approach for casual or occasional server needs on a home network.
&lt;/div&gt;
      
            &lt;div class="field field--name-node-link field--type-ds field--label-hidden field--item"&gt;  &lt;a href="https://www.linuxjournal.com/content/consolidate-put-your-servers-virtualbox-vm" hreflang="en"&gt;Go to Full Article&lt;/a&gt;
&lt;/div&gt;
      
    &lt;/div&gt;
  &lt;/div&gt;

</description>
  <pubDate>Thu, 30 Sep 2010 13:00:00 +0000</pubDate>
    <dc:creator>Michael Reed</dc:creator>
    <guid isPermaLink="false">1014337 at https://www.linuxjournal.com</guid>
    </item>

  </channel>
</rss>
