最常被要的默认配置
大家都用得到的 config,直接复制就行。
Apache HTTP Server 配置
Apache HTTP Server 最常被要的默认配置
Apache HTTP Server
Ubuntu 24.04
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server …
<VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to identify itself. This is used when creating # redir…
Apache HTTP Server
Red Hat Enterprise Linux 9
# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that …
# # This is the main Apache HTTP server configuration file. It contains the # configuration directives that give the server its instructions. # See <URL:http://httpd.ap…
Apache HTTP Server
Ubuntu 24.04
# envvars - default environment variables for apache2ctl # this won't be correct after changing uid unset HO…
# envvars - default environment variables for apache2ctl
# this won't be correct after changing uid
unset HOME
# for supporting multiple apache2 instances
if [ "${APAC…
APT 配置
APT 最常被要的默认配置
APT
Debian 9
# Since Docker users are looking for the smallest possible final images, the # following emerges as a very co…
# Since Docker users are looking for the smallest possible final images, the # following emerges as a very common pattern: # RUN apt-get update \ # && apt-get i…
APT
Debian 13
-----BEGIN PGP PUBLIC KEY BLOCK----- mDMEZ+Gq1RYJKwYBBAHaRw8BAQdARlh1OX84KPJRedAP/M7WxPFEthWypAp8nved FhqaX0…
-----BEGIN PGP PUBLIC KEY BLOCK----- mDMEZ+Gq1RYJKwYBBAHaRw8BAQdARlh1OX84KPJRedAP/M7WxPFEthWypAp8nved FhqaX0q0R0RlYmlhbiBTdGFibGUgUmVsZWFzZSBLZXkgKDEzL3RyaXhpZSkgPGRl Y…
APT
Debian 9
[Unit] Description=Daily apt download activities Documentation=man:apt(8) ConditionACPower=true After=network…
[Unit] Description=Daily apt download activities Documentation=man:apt(8) ConditionACPower=true After=network-online.target Wants=network-online.target [Service] Type=o…
MariaDB 配置
MariaDB 最常被要的默认配置
MariaDB
Debian 9
#!/bin/bash # # This script is executed by "/etc/init.d/mysql" on every (re)start. # # Changes to this file w…
#!/bin/bash # # This script is executed by "/etc/init.d/mysql" on every (re)start. # # Changes to this file will be preserved when updating the Debian package. # # NOTE:…
MariaDB
Debian 9
# The MariaDB configuration file # # The MariaDB/MySQL tools read configuration files in the following order:…
# The MariaDB configuration file # # The MariaDB/MySQL tools read configuration files in the following order: # 1. "/etc/mysql/mariadb.cnf" (this file) to set global def…
MariaDB
Debian 9
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistri…
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera…
MySQL 配置
MySQL 最常被要的默认配置
MySQL
Debian 9
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistri…
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera…
MySQL
Debian 9
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistri…
# Copyright (c) 2015, 2021, Oracle and/or its affiliates. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU Genera…
MySQL
Red Hat Enterprise Linux 9
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/8.4/en/server-configurati…
# For advice on how to change settings please see # http://dev.mysql.com/doc/refman/8.4/en/server-configuration-defaults.html [mysqld] # # Remove leading # and set to t…
NGINX 配置
NGINX 最常被要的默认配置
NGINX
Debian 9
## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration …
## # You should look at the following URL's in order to grasp a solid understanding # of Nginx configuration files in order to fully unleash the power of Nginx. # https:…
NGINX
Debian 9
# regex to split $uri to $fastcgi_script_name and $fastcgi_path fastcgi_split_path_info ^(.+\.php)(/.+)$; # …
# regex to split $uri to $fastcgi_script_name and $fastcgi_path fastcgi_split_path_info ^(.+\.php)(/.+)$; # Check that the PHP script exists before passing it try_files…
NGINX
CentOS Stream 9
# This map is not a full windows-1251 <> utf8 map: it does not # contain Serbian and Macedonian letters. If…
# This map is not a full windows-1251 <> utf8 map: it does not # contain Serbian and Macedonian letters. If you need a full map, # use contrib/unicode2nginx/win-utf ma…
Odoo 配置
Odoo 最常被要的默认配置
Odoo
Debian 9
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep …
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep = , ; db_maxconn = 64 ; db_name = False ; db_template = temp…
Odoo
Red Hat Enterprise Linux 9
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep …
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep = , ; db_maxconn = 64 ; db_name = False ; db_template = temp…
Odoo
CentOS Stream 9
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep …
[options] addons_path = /mnt/extra-addons data_dir = /var/lib/odoo ; admin_passwd = admin ; csv_internal_sep = , ; db_maxconn = 64 ; db_name = False ; db_template = temp…
OpenSSH 配置
OpenSSH 最常被要的默认配置
OpenSSH
Debian 9
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide config…
# $OpenBSD: sshd_config,v 1.100 2016/08/15 12:32:04 naddy Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. #…
OpenSSH
Debian 9
# This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This fi…
# This is the ssh client system-wide configuration file. See # ssh_config(5) for more information. This file provides defaults for # users, and the values can be chan…
OpenSSH
Debian 9
# Time Type Tests Tries Size Generator Modulus 20160301052556 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A15…
# Time Type Tests Tries Size Generator Modulus 20160301052556 2 6 100 2047 5 DA57B18976E9C55CEAC3BFFF70419A1550258EA7359400BD4FAC8F4203B73E0BC54D62C0A2D9AA9B543FACA02905…
OpenSSL 配置
OpenSSL 最常被要的默认配置
OpenSSL
Debian 9
# # OpenSSL example configuration file. # This is mostly being used for generation of certificate requests. #…
# # OpenSSL example configuration file. # This is mostly being used for generation of certificate requests. # # This definition stops the following lines choking if HOM…
OpenSSL
Alpine Linux 3.21
# # OpenSSL example configuration file. # See doc/man5/config.pod for more info. # # This is mostly being use…
# # OpenSSL example configuration file. # See doc/man5/config.pod for more info. # # This is mostly being used for generation of certificate requests, # but may be used …
OpenSSL
Alpine Linux 3.21
-----BEGIN CERTIFICATE----- MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE AwwJQUNDVlJBSVox…
-----BEGIN CERTIFICATE----- MIIH0zCCBbugAwIBAgIIXsO3pkN/pOAwDQYJKoZIhvcNAQEFBQAwQjESMBAGA1UE AwwJQUNDVlJBSVoxMRAwDgYDVQQLDAdQS0lBQ0NWMQ0wCwYDVQQKDARBQ0NWMQsw CQYDVQQGEwJ…
Postfix 配置
Postfix 最常被要的默认配置
Postfix
Debian 9
# See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying…
# See /usr/share/postfix/main.cf.dist for a commented, more complete version # Debian specific: Specifying a file name will cause the first # line of that file to be …
Postfix
Debian 9
# Global Postfix configuration file. This file lists only a subset # of all parameters. For the syntax, and f…
# Global Postfix configuration file. This file lists only a subset # of all parameters. For the syntax, and for a complete parameter # list, see the postconf(5) manual p…
Postfix
Debian 9
# # Postfix master process configuration file. For details on the format # of the file, see the master(5) ma…
# # Postfix master process configuration file. For details on the format # of the file, see the master(5) manual page (command: "man 5 master" or # on-line: http://www.…
PostgreSQL 配置
PostgreSQL 最常被要的默认配置
PostgreSQL
Ubuntu 24.04
# ----------------------------- # PostgreSQL configuration file # ----------------------------- # # This file…
# ----------------------------- # PostgreSQL configuration file # ----------------------------- # # This file consists of lines of the form: # # name = value # # (The …
PostgreSQL
Debian 9
/var/log/postgresql/*.log { weekly rotate 10 copytruncate delaycompress co…
/var/log/postgresql/*.log {
weekly
rotate 10
copytruncate
delaycompress
compress
notifempty
missingok
su root roo…
PostgreSQL
Ubuntu 24.04
# PostgreSQL User Name Maps # ========================= # # --------------- # Mapping Records # -------------…
# PostgreSQL User Name Maps # ========================= # # --------------- # Mapping Records # --------------- # # Refer to the PostgreSQL documentation, chapter "Clien…
Redis 配置
Redis 最常被要的默认配置
Redis
Debian 9
[Unit] Description=Advanced key-value store After=network.target Documentation=http://redis.io/documentation,…
[Unit] Description=Advanced key-value store After=network.target Documentation=http://redis.io/documentation, man:redis-server(1) [Service] Type=forking ExecStart=/usr/…
Redis
Debian 9
/var/log/redis/redis-server*.log { weekly missingok rotate 12 compress …
/var/log/redis/redis-server*.log {
weekly
missingok
rotate 12
compress
notifempty
}
Redis
Alpine Linux 3.21
/var/log/redis/*.log { notifempty missingok }
/var/log/redis/*.log {
notifempty
missingok
}