svn commit: r44582 - head/en_US.ISO8859-1/books/handbook/network-servers

Dru Lavigne dru at FreeBSD.org
Wed Apr 16 17:32:07 UTC 2014


Author: dru
Date: Wed Apr 16 17:32:06 2014
New Revision: 44582
URL: http://svnweb.freebsd.org/changeset/doc/44582

Log:
  Finish editorial pass through Apache chapter.
  Update mod_php to reflect the new port.
  Comment out some of the mod_php config until it can be confirmed as
  required--the new port does not add these lines and I suspect they were
  only needed in Apache 1.x.
  Add some references.
  
  Sponsored by:	iXsystems

Modified:
  head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml

Modified: head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml
==============================================================================
--- head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml	Wed Apr 16 17:21:04 2014	(r44581)
+++ head/en_US.ISO8859-1/books/handbook/network-servers/chapter.xml	Wed Apr 16 17:32:06 2014	(r44582)
@@ -4498,21 +4498,21 @@ DocumentRoot <replaceable>/www/someother
       </sect3>
 
       <sect3>
-	<title><filename>mod_perl2</filename></title>
+	<title><filename>mod_perl</filename></title>
 
 	<indexterm>
-	  <primary>mod_perl2</primary>
+	  <primary>mod_perl</primary>
 	  <secondary>Perl</secondary>
 	</indexterm>
 
 	<para>The
-	  <filename>mod_perl2</filename> module makes it possible
+	  <filename>mod_perl</filename> module makes it possible
 	  to write <application>Apache</application> modules
 	  in <application>Perl</application>.  In addition, the persistent interpreter embedded
 	  in the server avoids the overhead of starting an external
 	  interpreter and the penalty of <application>Perl</application> start-up time.</para>
 
-	<para>The <filename>mod_perl2</filename> can be installed using the
+	<para>The <filename>mod_perl</filename> can be installed using the
 	  <package>www/mod_perl2</package> package or
 	  port.  Documentation for using this module can be found at
 	  <uri
@@ -4521,7 +4521,7 @@ DocumentRoot <replaceable>/www/someother
 
       <sect3>
 	<info>
-	<title><application>mod_php</application></title>
+	<title><filename>mod_php</filename></title>
 
 	  <authorgroup>
 	    <author>
@@ -4539,57 +4539,27 @@ DocumentRoot <replaceable>/www/someother
 	  <secondary>PHP</secondary>
 	</indexterm>
 
-	<para><acronym>PHP</acronym>, also known as
-	  <quote>PHP: Hypertext Preprocessor</quote> is a
+	<para><firstterm>PHP: Hypertext Preprocessor</firstterm>
+	  (<acronym>PHP</acronym>) is a
 	  general-purpose scripting language that is especially suited
-	  for Web development.  Capable of being embedded into
-	  <acronym>HTML</acronym> its syntax draws upon C, &java;, and
-	  Perl with the intention of allowing web developers to write
+	  for web development.  Capable of being embedded into
+	  <acronym>HTML</acronym>, its syntax draws upon
+	  <application>C</application>, &java;, and
+	  <application>Perl</application> with the intention of allowing web developers to write
 	  dynamically generated webpages quickly.</para>
 
 	<para>To gain support for <acronym>PHP</acronym>5 for the
-	  <application>Apache</application> web server, begin by
-	  installing the <package>lang/php5</package>
-	  port.</para>
-
-	<para>If the <package>lang/php5</package>
-	  port is being installed for the first time, available
-	  <literal>OPTIONS</literal> will be displayed automatically.
-	  If a menu is not displayed, i.e., because the
-	  <package>lang/php5</package> port has been installed some
-	  time in the past, it is always possible to bring the
-	  options dialog up again by running:</para>
-
-	<screen>&prompt.root; <userinput>make config</userinput></screen>
-
-	<para>in the port directory.</para>
-
-	<para>In the options dialog, check the
-	  <literal>APACHE</literal> option to build
-	  <application>mod_php5</application> as a loadable module for
-	  the <application>Apache</application> web server.</para>
-
-	<note>
-	  <para>A lot of sites are still using <acronym>PHP</acronym>4
-	    for various reasons (i.e., compatibility issues or already
-	    deployed web applications).  If the
-	    <application>mod_php4</application> is needed instead of
-	    <application>mod_php5</application>, then please use the
-	    <package>lang/php4</package> port.  The
-	    <package>lang/php4</package> port
-	    supports many of the configuration and build-time options
-	    of the <package>lang/php5</package>
-	    port.</para>
-	</note>
-
-	<para>This will install and configure the modules required
+	  <application>Apache</application> web server,
+	  install the <package>www/mod_php5</package> package or
+	  port.  This will install and configure the modules required
 	  to support dynamic <acronym>PHP</acronym> applications.
-	  Check to ensure the following sections have been added to
-	  <filename>/usr/local/etc/apache22/httpd.conf</filename>:</para>
+	  The installation will automatically add this line to
+	  <filename>/usr/local/etc/apache2<replaceable>4</replaceable>/httpd.conf</filename>:</para>
 
-	<programlisting>LoadModule php5_module        libexec/apache/libphp5.so</programlisting>
-
-	<programlisting>AddModule mod_php5.c
+	<programlisting>LoadModule php5_module        libexec/apache24/libphp5.so</programlisting>
+<!--
+I don't think this is still needed
+AddModule mod_php5.c
     <IfModule mod_php5.c>
         DirectoryIndex index.php index.html
     </IfModule>
@@ -4597,31 +4567,24 @@ DocumentRoot <replaceable>/www/someother
         AddType application/x-httpd-php .php
         AddType application/x-httpd-php-source .phps
     </IfModule></programlisting>
-
-	<para>Once completed, a simple call to the
-	  <command>apachectl</command> command for a graceful
-	  restart is needed to load the <acronym>PHP</acronym>
+    -->
+	<para>Then, perform a graceful
+	  restart to load the <acronym>PHP</acronym>
 	  module:</para>
 
 	<screen>&prompt.root; <userinput>apachectl graceful</userinput></screen>
 
-	<para>For future upgrades of <acronym>PHP</acronym>, the
-	  <command>make config</command> command will not be required;
-	  the selected <literal>OPTIONS</literal> are saved
-	  automatically by the &os; Ports framework.</para>
-
-	<para>The <acronym>PHP</acronym> support in &os; is extremely
-	  modular so the base install is very limited.  It is very
-	  easy to add support using the
+	<para>The <acronym>PHP</acronym> support provided by
+	  <package>www/mod_php5</package>
+	  is limited.  Additional
+	  support can be installed using the
 	  <package>lang/php5-extensions</package>
-	  port.  This port provides a menu driven interface to
-	  <acronym>PHP</acronym> extension installation.
-	  Alternatively, individual extensions can be installed using
-	  the appropriate port.</para>
-
-	<para>For instance, to add support for the
-	  <application>MySQL</application> database server to
-	  <acronym>PHP</acronym>5, simply install the port
+	  port which provides a menu driven interface to the available
+	  <acronym>PHP</acronym> extensions.</para>
+
+	<para>Alternatively, individual extensions can be installed using
+	  the appropriate port.  For instance, to add <acronym>PHP</acronym> support for the
+	  <application>MySQL</application> database server, install
 	  <filename>databases/php5-mysql</filename>.</para>
 
 	<para>After installing an extension, the
@@ -4640,15 +4603,11 @@ DocumentRoot <replaceable>/www/someother
 	<secondary>dynamic</secondary>
       </indexterm>
 
-      <para>In the last decade, more businesses have turned to the
-	Internet in order to enhance their revenue and increase
-	exposure.  This has also increased the need for interactive
-	web content.  While some companies, such as µsoft;,
-	have introduced solutions into their proprietary products,
-	the open source community answered the call.  Modern options
-	for dynamic web content include Django, Ruby on Rails,
-	<application>mod_perl2</application>, and
-	<application>mod_php</application>.</para>
+      <para>In addition to <application>mod_perl</application> and
+	<application>mod_php</application>, other languages are
+	available for creating dynamic web content.  These include
+	<application>Django</application> and
+	<application>Ruby on Rails</application>.</para>
 
       <sect3>
 	<title>Django</title>
@@ -4656,54 +4615,54 @@ DocumentRoot <replaceable>/www/someother
 	<indexterm><primary>Python</primary></indexterm>
 	<indexterm><primary>Django</primary></indexterm>
 
-	<para>Django is a BSD licensed framework designed to allow
+	<para><application>Django</application> is a BSD-licensed framework designed to allow
 	  developers to write high performance, elegant web
 	  applications quickly.  It provides an object-relational
-	  mapper so that data types are developed as Python objects,
-	  and a rich dynamic database-access API is provided for those
-	  objects without the developer ever having to write SQL.  It
+	  mapper so that data types are developed as <application>Python</application> objects.
+	  A rich dynamic database-access <acronym>API</acronym> is provided for those
+	  objects without the developer ever having to write <acronym>SQL</acronym>.  It
 	  also provides an extensible template system so that the
-	  logic of the application is separated from the HTML
+	  logic of the application is separated from the <acronym>HTML</acronym>
 	  presentation.</para>
 
-	<para>Django depends on <application>mod_python</application>,
-	  <application>Apache</application>, and an SQL database
-	  engine.  The &os; Port will install all of
-	  these pre-requisites with the appropriate
-	  flags.</para>
-
-	<example xml:id="network-www-django-install">
-	  <title>Installing Django with
-	    <application>Apache2</application>,
-	    <application>mod_python3</application>, and
-	    <application>PostgreSQL</application></title>
-
-	  <screen>&prompt.root; <userinput>cd /usr/ports/www/py-django; make all install clean -DWITH_MOD_PYTHON3 -DWITH_POSTGRESQL</userinput></screen>
-	</example>
-
-	<para>Once Django and these pre-requisites are installed,
-	  the application will need a Django project directory along
-	  with the Apache configuration to use the embedded Python
-	  interpreter.  This will be the interpreter to
-	  call the application for specific URLs on the site.</para>
-
-	<example xml:id="network-www-django-apache-config">
-	  <title>Apache Configuration for Django/mod_python</title>
-
-	  <para>A line must be added to the apache
-	    <filename>httpd.conf</filename> file to configure Apache
-	    to pass requests for certain URLs to the web
-	    application:</para>
+	<para>Django depends on <filename>mod_python</filename>,
+	  and an <acronym>SQL</acronym> database
+	  engine.  In &os;, the <package>www/py-django</package> port
+	  automatically installs <filename>mod_python</filename> and
+	  supports the <application>PostgreSQL</application>,
+	  <application>MySQL</application>, or
+	  <application>SQLite</application> databases, with the default
+	  being <application>SQLite</application>.  To change the
+	  datbase engine, type <command>make config</command> within
+	  <filename>/usr/ports/www/py-django</filename>, then install
+	  the port.</para>
+
+	<para>Once <application>Django</application> is installed,
+	  the application will need a project directory along
+	  with the <application>Apache</application> configuration in order to
+	  use the embedded <application>Python</application>
+	  interpreter.  This interpreter is used to
+	  call the application for specific <acronym>URL</acronym>s on the site.</para>
+
+	<para>To configure <application>Apache</application> to pass
+	  requests for certain <acronym>URL</acronym>s to the web
+	  application, add the following to
+	  <filename>httpd.conf</filename>, specifying the full path to
+	  the project directory:</para>
 
 	  <screen><Location "/">
     SetHandler python-program
-    PythonPath "['/dir/to/the/django/packages/'] + sys.path"
+    PythonPath "['<replaceable>/dir/to/the/django/packages/</replaceable>'] + sys.path"
     PythonHandler django.core.handlers.modpython
     SetEnv DJANGO_SETTINGS_MODULE mysite.settings
     PythonAutoReload On
     PythonDebug On
 </Location></screen>
-	</example>
+
+	<para>Refer to <uri
+	    xlink:href="https://docs.djangoproject.com/en/1.6/">https://docs.djangoproject.com/en/1.6/</uri>
+	  for more information on how to use
+	  <application>Django</application>.</para>
       </sect3>
 
       <sect3>
@@ -4711,13 +4670,17 @@ DocumentRoot <replaceable>/www/someother
 
 	<indexterm><primary>Ruby on Rails</primary></indexterm>
 
-	<para>Ruby on Rails is another open source web framework that
-	  provides a full development stack and is optimized to make
+	<para><application>Ruby on Rails</application> is another open source web framework that
+	  provides a full development stack.  It is optimized to make
 	  web developers more productive and capable of writing
-	  powerful applications quickly.  It can be installed easily
-	  from the ports system.</para>
+	  powerful applications quickly.  On &os;, tt can be installed
+	  using the <package>www/rubygem-rails</package> package or
+	  port.</para>
 
-	<screen>&prompt.root; <userinput>cd /usr/ports/www/rubygem-rails; make all install clean</userinput></screen>
+	<para>Refer to <uri
+	    xlink:href="http://rubyonrails.org/documentation">http://rubyonrails.org/documentation</uri>
+	  for more information on how to use <application>Ruby on
+	    Rails</application>.</para>
       </sect3>
     </sect2>
   </sect1>


More information about the svn-doc-all mailing list