The translation is temporarily closed for contributions due to maintenance, please come back later.


(itstool) path: sect3/para
Reload the configuration using the <command>apachectl</command> <parameter>reload</parameter> command and test the configuration either by using either of the following methods after visiting one of the hosted pages:
Context English Persian State
It is necessary to pass the output to a pager, such as the <command>more</command> or <command>less</command> to easier digest the amount of output.
Finally, to make any changes to the global configuration of <acronym>PHP</acronym> there is a well documented file installed into <filename role="directory">/usr/local/etc/php.ini</filename>. At the time of install, this file will not exist because there are two versions to choose from, one is <filename>php.ini-development</filename> and the other is <filename>php.ini-production</filename>. These are starting points to assist administrators in their deployment.
HTTP2 Support
<application>Apache</application> support for the <acronym>HTTP</acronym>2 protocol is included by default when installing the port with <command>pkg</command>. The new version of <acronym>HTTP</acronym> includes many improvements over the previous version, including utilizing a single connection to a website, reducing overall roundtrips of <acronym>TCP</acronym> connections. Also, packet header data is compressed and <acronym>HTTP</acronym>2 requires encryption by default.
When <application>Apache</application> is configured to only use <acronym>HTTP</acronym>2, web browsers will require secure, encrypted <acronym>HTTPS</acronym> connections. When <application>Apache</application> is configured to use both versions, <acronym>HTTP</acronym>1.1 will be considered a fall back option if any issues arise during the connection.
While this change does require administrators to make changes, they are positive and equate to a more secure Internet for everyone. The changes are only required for sites not currently implementing <acronym>SSL</acronym> and <acronym>TLS</acronym>.
This configuration depends on the previous sections, including <acronym>TLS</acronym> support. It is recommended those instructions be followed before continuing with this configuration.
Start the process by enabling the <acronym>http</acronym>2 module by uncommenting the line in <filename>/usr/local/etc/apache24/httpd.conf</filename> and replace the mpm_prefork module with mpm_event as the former does not support <acronym>HTTP</acronym>2.
LoadModule http2_module libexec/apache24/
LoadModule mpm_event_module libexec/apache24/
There is a separate <filename role="port">mod_http2</filename> port that is available. It exists to deliver security and bug fixes quicker than the module installed with the bundled <filename role="port">apache24</filename> port. It is not required for <acronym>HTTP</acronym>2 support but is available. When installed, the <filename></filename> should be used in place of <filename></filename> in the <application>Apache</application> configuration.
There are two methods to implement <acronym>HTTP</acronym>2 in <application>Apache</application>; one way is globally for all sites and each VirtualHost running on the system. To enable <acronym>HTTP</acronym>2 globally, add the following line under the ServerName directive:
Protocols h2 http/1.1
To enable <acronym>HTTP</acronym>2 over plaintext, use <acronym>h2</acronym> <acronym>h2c</acronym> <acronym>http</acronym>/1.1 in the <filename>httpd.conf</filename>.
Having the <acronym>h2c</acronym> here will allow plaintext <acronym>HTTP</acronym>2 data to pass on the system but is not recommended. In addition, using the <acronym>http</acronym>/1.1 here will allow fallback to the <acronym>HTTP</acronym>1.1 version of the protocol should it be needed by the system.
To enable <acronym>HTTP</acronym>2 for individual VirtualHosts, add the same line within the VirtualHost directive in either <filename>httpd.conf</filename> or <filename>httpd-ssl.conf</filename>.
Reload the configuration using the <command>apachectl</command> <parameter>reload</parameter> command and test the configuration either by using either of the following methods after visiting one of the hosted pages:
<prompt>#</prompt> <userinput>grep "HTTP/2.0" /var/log/httpd-access.log</userinput> <prompt>%</prompt> <userinput>top</userinput>
This should return something similar to the following: - - [18/Oct/2020:18:34:36 -0400] "GET / HTTP/2.0" 304 - - - [18/Oct/2020:19:19:57 -0400] "GET / HTTP/2.0" 304 - - - [18/Oct/2020:19:20:52 -0400] "GET / HTTP/2.0" 304 - - - [18/Oct/2020:19:23:10 -0400] "GET / HTTP/2.0" 304 -
The other method is using the web browser's built in site debugger or <command>tcpdump</command>; however, using either method is beyond the scope of this document.
Support for <acronym>HTTP</acronym>2 reverse proxy connections by using the <filename></filename> module. When configuring the ProxyPass or RewriteRules [P] statements, they should use h2:// for the connection.
Dynamic Websites
<primary>web servers</primary> <secondary>dynamic</secondary>
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>.
<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 <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 <acronym>HTML</acronym> presentation.
Django depends on <filename>mod_python</filename>, and an <acronym>SQL</acronym> database engine. In FreeBSD, 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 database engine, type <command>make config</command> within <filename>/usr/ports/www/py-django</filename>, then install the port.
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.
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:


No matching activity found.

Browse all component changes


English Persian
No related strings found in the glossary.

Source information

Source string comment
(itstool) path: sect3/para
Source string location
String age
3 months ago
Source string age
3 months ago
Translation file
books/fa/handbook.po, string 9608