Apache HTTP Server /etc/apache2/mods-available/http2.conf

Original ๐Ÿ“‹ Ubuntu 24.04 LTS (Noble Numbat) 30 lines

Works On

Viewing:
Ubuntu 24.04 LTS (Noble Numbat)
Same on:
Debian 13 (Trixie)
Other versions:

Details

Size
30 lines
MD5
5bc6b4b533d920c8b677f3bb37734a0f
SHA256
2425be9c2c9ec7d3912048c16ce2e12566db476f8603f1029ffbded51f90a185

Copy & Paste

curl:
curl https://exampleconfig.com/api/v1/config/original/5bc6b4b533d920c8b677f3bb37734a0f?hint=http2.conf
wget:
wget -O http2.conf https://exampleconfig.com/api/v1/config/original/5bc6b4b533d920c8b677f3bb37734a0f?hint=http2.conf

For AI Agents

You are a DevOps agent. Fetch the default Apache HTTP Server config for Ubuntu 24.04 LTS (Noble Numbat) from https://exampleconfig.com/api/v1/config/original/5bc6b4b533d920c8b677f3bb37734a0f?hint=http2.conf. Compare with my current /etc/apache2/mods-available/http2.conf and summarize differences and safe changes.

Copy this prompt into Claude, ChatGPT, or other AI assistants.

/etc/apache2/mods-available/http2.conf
Protocols h2 h2c http/1.1

# # HTTP/2 push configuration
#
# H2Push          on
#
# # Default Priority Rule
#
# H2PushPriority * After 16
#
# # More complex ruleset:
#
# H2PushPriority  *                       after
# H2PushPriority  text/css                before
# H2PushPriority  image/jpeg              after   32
# H2PushPriority  image/png               after   32
# H2PushPriority  application/javascript  interleaved
#
# # Configure some stylesheet and script to be pushed by the webserver
#
# <FilesMatch "\.html$">
#     Header add Link "</style.css>; rel=preload; as=style"
#     Header add Link "</script.js>; rel=preload; as=script"
# </FilesMatch>
# Since mod_http2 doesn't support the mod_logio module (which provide the %O format),
# you may want to change your LogFormat directive as follow:
#
# LogFormat "%v:%p %h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" vhost_combined
# LogFormat "%h %l %u %t \"%r\" %>s %B \"%{Referer}i\" \"%{User-Agent}i\"" combined
# LogFormat "%h %l %u %t \"%r\" %>s %B" common

Install Apache HTTP Server

Alpine Linux

sudo apk add apache2

Debian

sudo apt update && sudo apt install apache2

Red Hat Enterprise Linux

sudo yum install httpd

Ubuntu

sudo apt update && sudo apt install apache2

File Location

File Path
/etc/apache2/mods-available/http2.conf
Directory
/etc/apache2/mods-available/
Significance
System-wide configuration directory
Description
Files in /etc/ contain system-wide configuration settings that affect all users.

FAQ

When should I use this http2.conf?

Restore it. Compare it. Start clean.

How do I restore Apache HTTP Server defaults?

Download, replace, restart.

Is http2.conf safe for production?

Yes. This is exactly what shipped. Safe starting point.

How does this differ from other OS versions?

Defaults change. This one is specific to Ubuntu 24.04 LTS (Noble Numbat).

Can I use this for Apache HTTP Server troubleshooting?

Absolutely. Diff this against yours to spot the problem.