<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Apache</id>
	<title>Apache - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://training-course-material.com/index.php?action=history&amp;feed=atom&amp;title=Apache"/>
	<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Apache&amp;action=history"/>
	<updated>2026-05-13T09:33:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.45.1</generator>
	<entry>
		<id>https://training-course-material.com/index.php?title=Apache&amp;diff=23956&amp;oldid=prev</id>
		<title>Cesar Chew at 17:46, 24 November 2014</title>
		<link rel="alternate" type="text/html" href="https://training-course-material.com/index.php?title=Apache&amp;diff=23956&amp;oldid=prev"/>
		<updated>2014-11-24T17:46:38Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Cat|Apache|01}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;slideshow style=&amp;quot;nobleprog&amp;quot; headingmark=&amp;quot;⌘&amp;quot; incmark=&amp;quot;…&amp;quot; scaled=&amp;quot;true&amp;quot; font=&amp;quot;Trebuchet MS&amp;quot; &amp;gt;&lt;br /&gt;
;title: Apache&lt;br /&gt;
;author: Sam Bashton (NobleProg Ltd)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/slideshow&amp;gt;&lt;br /&gt;
=== What is Apache? ⌘===&lt;br /&gt;
* Mature, stable HTTP server&lt;br /&gt;
* Many, many features&lt;br /&gt;
* Many, many modules available&lt;br /&gt;
=== Installing ⌘===&lt;br /&gt;
* Included in the standard EL5 repos&lt;br /&gt;
* `yum -y install httpd`&lt;br /&gt;
=== Changing the configuration ⌘===&lt;br /&gt;
* Main configuration file at `/etc/httpd/conf/httpd.conf`&lt;br /&gt;
* Syntax check with `service httpd configtest`&lt;br /&gt;
* Re-read config with `service httpd reload`&lt;br /&gt;
* Some actions (eg adding SSL certs) require a full restart&lt;br /&gt;
 `service httpd restart`&lt;br /&gt;
=== Virtualhosts ⌘===&lt;br /&gt;
* Create a file /etc/httpd/conf.d/vhost.conf&lt;br /&gt;
 ```&lt;br /&gt;
 &amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
  ServerName localhost&lt;br /&gt;
  DocumentRoot /var/www/html&lt;br /&gt;
  CustomLog /var/log/httpd/localhost-access.log combined&lt;br /&gt;
  ErrorLog /var/log/httpd/localhost-error.log&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 ```&lt;br /&gt;
&lt;br /&gt;
=== Adding altername names to a vhost ⌘===&lt;br /&gt;
* Alternate names can be added via the ServerAlias parameter&lt;br /&gt;
* Multiple names can be specified, separated by a space&lt;br /&gt;
=== Default VirtualHost ⌘===&lt;br /&gt;
* The default virtualhost is the one that is the first alphabetically &lt;br /&gt;
* This will be used even if the ServerName/ServerAlias doesn&amp;#039;t match if you remove welcome.conf&lt;br /&gt;
=== IP based virtual hosts ⌘===&lt;br /&gt;
* What we just created was a name based VirtualHost&lt;br /&gt;
* We can also create address based VirtualHosts&lt;br /&gt;
* These are commonly used with SSL&lt;br /&gt;
 ```&lt;br /&gt;
 NameVirtualHost 192.168.34.1:80&lt;br /&gt;
 &amp;lt;VirtualHost 192.168.34.1:80&amp;gt;&lt;br /&gt;
  DocumentRoot /var/www/html&lt;br /&gt;
  CustomLog /var/log/httpd/localhost-access.log combined&lt;br /&gt;
  ErrorLog /var/log/httpd/localhost-error.log&lt;br /&gt;
 &amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
 ```&lt;br /&gt;
=== Exercise ⌘===&lt;br /&gt;
* There is some content under /var/www/exercise&lt;br /&gt;
* Create a virtualhost which will serve this only in response to a request for localhost.localdomain&lt;br /&gt;
:* `$ curl http://localhost.localdomain/`&lt;/div&gt;</summary>
		<author><name>Cesar Chew</name></author>
	</entry>
</feed>