<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_HTTP%2F2_and_HTTP%2F3</id>
	<title>Setting Up HTTP/2 and HTTP/3 - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://serverrental.store/index.php?action=history&amp;feed=atom&amp;title=Setting_Up_HTTP%2F2_and_HTTP%2F3"/>
	<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Setting_Up_HTTP/2_and_HTTP/3&amp;action=history"/>
	<updated>2026-04-15T15:06:48Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.36.1</generator>
	<entry>
		<id>https://serverrental.store/index.php?title=Setting_Up_HTTP/2_and_HTTP/3&amp;diff=5731&amp;oldid=prev</id>
		<title>Admin: New server guide</title>
		<link rel="alternate" type="text/html" href="https://serverrental.store/index.php?title=Setting_Up_HTTP/2_and_HTTP/3&amp;diff=5731&amp;oldid=prev"/>
		<updated>2026-04-12T15:55:52Z</updated>

		<summary type="html">&lt;p&gt;New server guide&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;= Setting Up HTTP/2 and HTTP/3 =&lt;br /&gt;
&lt;br /&gt;
This guide provides a comprehensive walkthrough for enabling HTTP/2 and HTTP/3 on your Nginx and Apache web servers. These modern protocols offer significant performance improvements over HTTP/1.1, leading to faster page load times and a better user experience.&lt;br /&gt;
&lt;br /&gt;
== Prerequisites ==&lt;br /&gt;
Before proceeding, ensure you have the following:&lt;br /&gt;
&lt;br /&gt;
*   A server running a modern Linux distribution (e.g., Ubuntu 20.04+, Debian 10+, CentOS 8+).&lt;br /&gt;
*   Root or sudo privileges.&lt;br /&gt;
*   A working web server (Nginx or Apache) already installed and serving content over HTTP/1.1.&lt;br /&gt;
*   A domain name pointing to your server's public IP address.&lt;br /&gt;
*   An SSL/TLS certificate installed for your domain. If you don't have one, consider using Let's Encrypt. For powerful GPU servers for demanding tasks, check out Immers Cloud GPU (https://en.immers.cloud/signup/r/20241007-8310688-334/). For reliable VPS hosting, PowerVPS (https://powervps.net/?from=32) is a good option.&lt;br /&gt;
*   Basic understanding of Linux command line and web server configuration.&lt;br /&gt;
&lt;br /&gt;
== Understanding HTTP/2 and HTTP/3 ==&lt;br /&gt;
&lt;br /&gt;
'''HTTP/2''' is a major revision of the HTTP network protocol that was first published in May 2015. It addresses many of the performance limitations of HTTP/1.1 by introducing features such as:&lt;br /&gt;
&lt;br /&gt;
*   '''Multiplexing:''' Allows multiple requests and responses to be sent concurrently over a single TCP connection.&lt;br /&gt;
*   '''Header Compression:''' Reduces the overhead of HTTP headers.&lt;br /&gt;
*   '''Server Push:''' Allows the server to proactively send resources to the client before they are requested.&lt;br /&gt;
*   '''Binary Framing:''' More efficient parsing and transmission of data.&lt;br /&gt;
&lt;br /&gt;
'''HTTP/3''' is the third major version of the HTTP network protocol. It is designed to overcome the limitations of TCP, which can lead to head-of-line blocking issues. HTTP/3 uses '''QUIC''' (Quick UDP Internet Connections) as its transport layer protocol, which runs over UDP. Key benefits include:&lt;br /&gt;
&lt;br /&gt;
*   '''Reduced Latency:''' Faster connection establishment due to 0-RTT or 1-RTT handshakes.&lt;br /&gt;
*   '''Improved Congestion Control:''' More robust and adaptable congestion control mechanisms.&lt;br /&gt;
*   '''No Head-of-Line Blocking:''' Packet loss in one stream does not affect other streams.&lt;br /&gt;
*   '''Built-in Encryption:''' TLS 1.3 is integrated into QUIC.&lt;br /&gt;
&lt;br /&gt;
== Configuring Nginx ==&lt;br /&gt;
&lt;br /&gt;
Nginx generally has excellent support for HTTP/2. HTTP/3 support is available through modules, often requiring compilation from source or using specific distributions.&lt;br /&gt;
&lt;br /&gt;
=== Enabling HTTP/2 in Nginx ===&lt;br /&gt;
&lt;br /&gt;
HTTP/2 is typically enabled by default in recent Nginx versions when SSL is configured.&lt;br /&gt;
&lt;br /&gt;
# Edit your Nginx server block configuration file. This is usually located in `/etc/nginx/sites-available/your_domain` or `/etc/nginx/conf.d/your_domain.conf`.&lt;br /&gt;
# Open the file with your preferred text editor:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/nginx/sites-available/your_domain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Ensure your `listen` directive includes `http2` for the SSL port (443).&lt;br /&gt;
# Your SSL configuration should look something like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
    listen 443 ssl http2 default_server;&lt;br /&gt;
    listen [::]:443 ssl http2 default_server;&lt;br /&gt;
&lt;br /&gt;
    server_name your_domain.com www.your_domain.com;&lt;br /&gt;
&lt;br /&gt;
    # SSL certificate paths&lt;br /&gt;
    ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem;&lt;br /&gt;
    ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem;&lt;br /&gt;
&lt;br /&gt;
    # Other SSL settings (e.g., protocols, ciphers)&lt;br /&gt;
    ssl_protocols TLSv1.2 TLSv1.3;&lt;br /&gt;
    ssl_ciphers 'ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384';&lt;br /&gt;
    ssl_prefer_server_ciphers off;&lt;br /&gt;
&lt;br /&gt;
    # ... your other server configurations (root, index, location blocks)&lt;br /&gt;
    root /var/www/your_domain/html;&lt;br /&gt;
    index index.html index.htm;&lt;br /&gt;
&lt;br /&gt;
    location / {&lt;br /&gt;
        try_files $uri $uri/ =404;&lt;br /&gt;
    }&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
# Optional: Redirect HTTP to HTTPS&lt;br /&gt;
server {&lt;br /&gt;
    listen 80 default_server;&lt;br /&gt;
    listen [::]:80 default_server;&lt;br /&gt;
    server_name your_domain.com www.your_domain.com;&lt;br /&gt;
    return 301 https://$host$request_uri;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Test your Nginx configuration for syntax errors:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nginx -t&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# If the test is successful, reload Nginx to apply the changes:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo systemctl reload nginx&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling HTTP/3 in Nginx ===&lt;br /&gt;
&lt;br /&gt;
HTTP/3 support in Nginx is still evolving and often requires compiling Nginx with specific modules or using pre-built packages that include them. A common approach is to use Nginx with the `ngx_http_v2_module` and QUIC support.&lt;br /&gt;
&lt;br /&gt;
'''Method 1: Using a Distribution with HTTP/3 Support (e.g., Cloudflare's packaged Nginx)'''&lt;br /&gt;
&lt;br /&gt;
Some distributions or custom Nginx builds include HTTP/3 support out-of-the-box. If you're using such a package, you might only need to enable it in your configuration.&lt;br /&gt;
&lt;br /&gt;
'''Method 2: Compiling Nginx from Source with QUIC support'''&lt;br /&gt;
&lt;br /&gt;
This is a more advanced method. You'll need to download the Nginx source code and compile it with the necessary QUIC/HTTP/3 modules. This process is detailed and beyond the scope of a simple wiki article but typically involves:&lt;br /&gt;
&lt;br /&gt;
# Downloading Nginx source and the BoringSSL library (or OpenSSL with QUIC support).&lt;br /&gt;
# Configuring Nginx build with `--with-http_v2_module` and QUIC-related flags.&lt;br /&gt;
# Compiling and installing.&lt;br /&gt;
&lt;br /&gt;
Once Nginx is compiled with HTTP/3 support, you would add a `listen` directive for UDP.&lt;br /&gt;
&lt;br /&gt;
# Edit your Nginx server block configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/nginx/sites-available/your_domain&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Add a `listen` directive for UDP port 443 with `http3` enabled.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
server {&lt;br /&gt;
    listen 443 ssl http2 default_server;&lt;br /&gt;
    listen [::]:443 ssl http2 default_server;&lt;br /&gt;
    listen 443 quic reuseport default_server; # For HTTP/3&lt;br /&gt;
    listen [::]:443 quic reuseport default_server; # For HTTP/3&lt;br /&gt;
&lt;br /&gt;
    server_name your_domain.com www.your_domain.com;&lt;br /&gt;
&lt;br /&gt;
    ssl_certificate /etc/letsencrypt/live/your_domain.com/fullchain.pem;&lt;br /&gt;
    ssl_certificate_key /etc/letsencrypt/live/your_domain.com/privkey.pem;&lt;br /&gt;
    ssl_protocols TLSv1.3; # HTTP/3 requires TLS 1.3&lt;br /&gt;
&lt;br /&gt;
    # ... other configurations ...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Test and reload Nginx as shown in the HTTP/2 section.&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Firewall rules must allow UDP traffic on port 443.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ufw allow 443/udp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or for firewalld:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo firewall-cmd --add-port=443/udp --permanent&lt;br /&gt;
sudo firewall-cmd --reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Configuring Apache ==&lt;br /&gt;
&lt;br /&gt;
Apache's support for HTTP/2 is well-established. HTTP/3 support is available via the `mod_h3` module, which often needs to be compiled or installed separately.&lt;br /&gt;
&lt;br /&gt;
=== Enabling HTTP/2 in Apache ===&lt;br /&gt;
&lt;br /&gt;
HTTP/2 support in Apache is provided by `mod_http2`.&lt;br /&gt;
&lt;br /&gt;
# Ensure `mod_http2` is enabled. On Debian/Ubuntu:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo a2enmod http2&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
On CentOS/RHEL (if not already compiled in): you might need to install a specific Apache package or compile from source.&lt;br /&gt;
&lt;br /&gt;
# Edit your Apache virtual host configuration file. This is usually located in `/etc/apache2/sites-available/your_domain.conf` or `/etc/httpd/conf.d/your_domain.conf`.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/apache2/sites-available/your_domain.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Add `Protocols h2 http/1.1` to your SSL-enabled virtual host.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:443&amp;gt;&lt;br /&gt;
    ServerName your_domain.com&lt;br /&gt;
    ServerAlias www.your_domain.com&lt;br /&gt;
&lt;br /&gt;
    Protocols h2 http/1.1&lt;br /&gt;
&lt;br /&gt;
    SSLEngine on&lt;br /&gt;
    SSLCertificateFile /etc/letsencrypt/live/your_domain.com/fullchain.pem&lt;br /&gt;
    SSLCertificateKeyFile /etc/letsencrypt/live/your_domain.com/privkey.pem&lt;br /&gt;
&lt;br /&gt;
    # ... other configurations (DocumentRoot, Directory settings)&lt;br /&gt;
    DocumentRoot /var/www/your_domain/html&lt;br /&gt;
    &amp;lt;Directory /var/www/your_domain/html&amp;gt;&lt;br /&gt;
        Options Indexes FollowSymLinks&lt;br /&gt;
        AllowOverride All&lt;br /&gt;
        Require all granted&lt;br /&gt;
    &amp;lt;/Directory&amp;gt;&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Optional: Redirect HTTP to HTTPS&lt;br /&gt;
&amp;lt;VirtualHost *:80&amp;gt;&lt;br /&gt;
    ServerName your_domain.com&lt;br /&gt;
    ServerAlias www.your_domain.com&lt;br /&gt;
    Redirect permanent / https://your_domain.com/&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Enable the site and restart Apache:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo a2ensite your_domain.conf # Debian/Ubuntu&lt;br /&gt;
sudo systemctl restart apache2 # Debian/Ubuntu&lt;br /&gt;
sudo systemctl restart httpd   # CentOS/RHEL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Enabling HTTP/3 in Apache ===&lt;br /&gt;
&lt;br /&gt;
Apache's HTTP/3 support relies on `mod_h3`. This module is not always included in standard packages and may require compilation.&lt;br /&gt;
&lt;br /&gt;
'''Method 1: Using a Distribution with mod_h3 Support'''&lt;br /&gt;
&lt;br /&gt;
Some distributions or custom Apache builds might include `mod_h3`.&lt;br /&gt;
&lt;br /&gt;
'''Method 2: Compiling Apache with mod_h3'''&lt;br /&gt;
&lt;br /&gt;
This involves downloading Apache source, compiling it with QUIC support (often via BoringSSL or OpenSSL), and then building `mod_h3`. This is a complex process.&lt;br /&gt;
&lt;br /&gt;
Once `mod_h3` is installed and enabled:&lt;br /&gt;
&lt;br /&gt;
# Edit your Apache virtual host configuration file.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo nano /etc/apache2/sites-available/your_domain.conf&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Add `Protocols h3 h2 http/1.1` to your SSL virtual host.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
&amp;lt;VirtualHost *:443&amp;gt;&lt;br /&gt;
    ServerName your_domain.com&lt;br /&gt;
    ServerAlias www.your_domain.com&lt;br /&gt;
&lt;br /&gt;
    Protocols h3 h2 http/1.1 # Enable HTTP/3, HTTP/2, and HTTP/1.1&lt;br /&gt;
&lt;br /&gt;
    SSLEngine on&lt;br /&gt;
    SSLCertificateFile /etc/letsencrypt/live/your_domain.com/fullchain.pem&lt;br /&gt;
    SSLCertificateKeyFile /etc/letsencrypt/live/your_domain.com/privkey.pem&lt;br /&gt;
&lt;br /&gt;
    # ... other configurations ...&lt;br /&gt;
&amp;lt;/VirtualHost&amp;gt;&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
# Restart Apache to apply changes.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo systemctl restart apache2 # Debian/Ubuntu&lt;br /&gt;
sudo systemctl restart httpd   # CentOS/RHEL&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
'''Note:''' Ensure UDP port 443 is open in your firewall.&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo ufw allow 443/udp&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
or for firewalld:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
sudo firewall-cmd --add-port=443/udp --permanent&lt;br /&gt;
sudo firewall-cmd --reload&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Verifying Protocol Support ==&lt;br /&gt;
&lt;br /&gt;
You can verify that HTTP/2 and HTTP/3 are being used by your server.&lt;br /&gt;
&lt;br /&gt;
# '''Using Browser Developer Tools:'''&lt;br /&gt;
# Open your website in a modern browser (Chrome, Firefox, Edge).&lt;br /&gt;
# Open the browser's developer tools (usually by pressing F12).&lt;br /&gt;
# Navigate to the &amp;quot;Network&amp;quot; tab.&lt;br /&gt;
# Reload your page.&lt;br /&gt;
# Look for a &amp;quot;Protocol&amp;quot; column. If it's not visible, right-click on the table headers and enable it.&lt;br /&gt;
# You should see &amp;quot;h2&amp;quot; for HTTP/2 and &amp;quot;h3&amp;quot; for HTTP/3.&lt;br /&gt;
&lt;br /&gt;
# '''Using Online Tools:'''&lt;br /&gt;
# There are several online tools that can check your website's protocol support, such as:&lt;br /&gt;
# *   KeyCDN's HTTP/2 Test: (Search online for &amp;quot;KeyCDN HTTP2 Test&amp;quot;)&lt;br /&gt;
# *   HTTP/3 Check: (Search online for &amp;quot;HTTP3 Check&amp;quot;)&lt;br /&gt;
&lt;br /&gt;
== Troubleshooting ==&lt;br /&gt;
&lt;br /&gt;
*   '''Firewall Blocking UDP:''' HTTP/3 relies on UDP. Ensure your firewall allows UDP traffic on port 443.&lt;br /&gt;
*   '''Incorrect Nginx/Apache Configuration:''' Double-check your configuration files for typos or syntax errors. Use `nginx -t` or `apachectl configtest`.&lt;br /&gt;
*   '''Outdated Web Server Version:''' Older versions of Nginx and Apache may not support HTTP/2 or HTTP/3, or may require specific compilation flags. Ensure you are using recent versions.&lt;br /&gt;
*   '''SSL Certificate Issues:''' HTTP/2 and HTTP/3 ''require'' SSL/TLS. Ensure your certificate is valid and correctly configured.&lt;br /&gt;
*   '''Module Not Loaded/Compiled:''' For HTTP/3, ensure the necessary modules (`ngx_http_v2_module` for Nginx, `mod_h3` for Apache) are compiled and enabled.&lt;br /&gt;
&lt;br /&gt;
== Further Reading ==&lt;br /&gt;
&lt;br /&gt;
*   [[Nginx Configuration]]&lt;br /&gt;
*   [[Apache Configuration]]&lt;br /&gt;
*   [[SSL/TLS Certificates]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Web Server Setup]]&lt;br /&gt;
[[Category:Nginx]]&lt;br /&gt;
[[Category:Apache]]&lt;br /&gt;
[[Category:Performance]]&lt;br /&gt;
&lt;br /&gt;
{{Exchange Box}}&lt;/div&gt;</summary>
		<author><name>Admin</name></author>
	</entry>
</feed>