最常被要的默认配置
大家都用得到的 config,直接复制就行。
Apache HTTP Server 配置
Apache HTTP Server 最常被要的默认配置
Apache HTTP Server
Ubuntu 24.04
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
DirectoryIndex index.html index.cgi index.pl index.php index.xhtml index.htm
Apache HTTP Server
Ubuntu 24.04
# Changing the following options will not really affect the security of the # server, but might make attacks …
# Changing the following options will not really affect the security of the # server, but might make attacks slightly more difficult in some cases. # # ServerTokens # T…
Apache HTTP Server
Ubuntu 24.04
<VirtualHost *:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: tr…
<VirtualHost *:443> ServerAdmin webmaster@localhost DocumentRoot /var/www/html # Available loglevels: trace8, ..., trace1, debug, info, notice, warn, # error, crit…
APT 配置
APT 最常被要的默认配置
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…
APT
Debian 9
deb http://archive.debian.org/debian stretch main deb http://archive.debian.org/debian-security stretch/updat…
deb http://archive.debian.org/debian stretch main deb http://archive.debian.org/debian-security stretch/updates main deb http://archive.debian.org/debian stretch-updates…
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…
MariaDB 配置
MariaDB 最常被要的默认配置
MariaDB
Debian 9
# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) shou…
# # These groups are read by MariaDB server. # Use it for options that only the server (but not clients) should see # # See the examples of server my.cnf files in /usr/s…
MariaDB
Debian 9
# Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = root pas…
# Automatically generated for Debian scripts. DO NOT TOUCH! [client] host = localhost user = root password = socket = /var/run/mysqld/mysqld.sock [mysql_upgra…
MariaDB
Debian 9
# NOTE: This file is read only by the traditional SysV init script, not systemd. # MariaDB systemd does _not_…
# NOTE: This file is read only by the traditional SysV init script, not systemd. # MariaDB systemd does _not_ utilize mysqld_safe nor read this file. # # For similar beh…
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 10
# Copyright (c) 2014, 2023, Oracle and/or its affiliates. # # This program is free software; you can redistri…
# Copyright (c) 2014, 2023, 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…
NGINX 配置
NGINX 最常被要的默认配置
NGINX
Debian 9
# Self signed certificates generated by the ssl-cert package # Don't use them in a production server! ssl_ce…
# Self signed certificates generated by the ssl-cert package # Don't use them in a production server! ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem; ssl_certific…
NGINX
Ubuntu 20.04
## # 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
/var/log/nginx/*.log { daily missingok rotate 14 compress delaycompress notifempty create 0640 www-dat…
/var/log/nginx/*.log {
daily
missingok
rotate 14
compress
delaycompress
notifempty
create 0640 www-data adm
sharedscripts
prerotate
if [ -d /etc/logrotate.d/h…
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
Ubuntu 24.04
# # 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
# # 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 …
Postfix 配置
Postfix 最常被要的默认配置
Postfix
CentOS Stream 9
# GENERIC(5) GENERIC(5) # # NAME # generic -…
# GENERIC(5) GENERIC(5) # # NAME # generic - Postfix generic table format # # SYNOPSIS # postmap…
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
# 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 …
PostgreSQL 配置
PostgreSQL 最常被要的默认配置
PostgreSQL
Debian 9
# environment variables for postgres processes # This file has the same syntax as postgresql.conf: # VARIABL…
# environment variables for postgres processes # This file has the same syntax as postgresql.conf: # VARIABLE = simple_value # VARIABLE2 = 'any value!' # I. e. you nee…
PostgreSQL
Debian 9
# PostgreSQL Client Authentication Configuration File # =================================================== #…
# PostgreSQL Client Authentication Configuration File # =================================================== # # Refer to the "Client Authentication" section in the Postg…
PostgreSQL
Ubuntu 24.04
# ----------------------------- # PostgreSQL configuration file # ----------------------------- # # This file…
# ----------------------------- # PostgreSQL configuration file # ----------------------------- # # This file consists of lines of the form: # # name = value # # (The …
Redis 配置
Redis 最常被要的默认配置
Redis
Ubuntu 20.04
/var/log/redis/redis-server*.log { weekly missingok rotate 12 compress …
/var/log/redis/redis-server*.log {
weekly
missingok
rotate 12
compress
notifempty
}
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
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/…