Skip to content

Commit

Permalink
Merge pull request #179 from LonelyYeezhiChicken/writer/chicken
Browse files Browse the repository at this point in the history
Writer/chicken
  • Loading branch information
LonelyYeezhiChicken authored Mar 23, 2024
2 parents 440323f + c755c2f commit 958e51c
Show file tree
Hide file tree
Showing 4 changed files with 106 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/daylily/mysqlDaylily/setIndocker.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,5 @@ FLUSH PRIVILEGES;
2. Driver properties
3. 將 useSSL 改為 false
4. 將 allowPublicKeyRetrieval 改為 true

:::
24 changes: 24 additions & 0 deletions docs/daylilyTool/toolApache/setConTimeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
sidebar_position: 35
description: Apache24 設定 Timeout
key: [Apache24, tool, windows, proxy sever]
tags: [Apache24, 工具, proxy sever]
---

# 🍂 Apache24 設定 Timeout

## 環境

- windows10 ~ 11
- [Apache24](https://www.apachehaus.com/cgi-bin/download.plx)

## 設定 Timeout

### 設定每個請求的 Timeout

> 檔案: /Apache24/conf/extra/httpd-default.conf
```shell
# Timeout: The number of seconds before receives and sends time out.
Timeout 30
```
28 changes: 28 additions & 0 deletions docs/daylilyTool/toolApache/setLogSize.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
sidebar_position: 25
description: Apache24 設定log大小
key: [Apache24, tool, windows, proxy sever]
tags: [Apache24, 工具, proxy sever]
---

# 🍂 Apache24 設定 log 大小

## 環境

- windows10 ~ 11
- [Apache24](https://www.apachehaus.com/cgi-bin/download.plx)

## 設定 log

### 限制每份 log 的大小

> 檔案: /Apache24/conf/httpd.conf
```xml
<IfModule log_config_module>
LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-Agent}i\"" combined

# 使用rotatelogs限制日誌檔案大小
CustomLog "|bin/rotatelogs ${SRVLOG}/access_log.%Y-%m-%d 10M" combined
</IfModule>
```
53 changes: 53 additions & 0 deletions docs/daylilyTool/toolApache/setMaxProcess.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
sidebar_position: 30
description: Apache24 設定process上限
key: [Apache24, tool, windows, proxy sever]
tags: [Apache24, 工具, proxy sever]
---

# 🍂 Apache24 設定 process

## 環境

- windows10 ~ 11
- [Apache24](https://www.apachehaus.com/cgi-bin/download.plx)
- mpm_winnt

## 設定 process

### 1. 確認環境使用的設定

- 使用終端機查詢

```shell
httpd -l
```

- 結果

```text {4}
Compiled in modules:
core.c
mod_win32.c
mpm_winnt.c
http_core.c
mod_so.c
```

> 這邊是使用 `mpm_winnt.c`
### 2. 進行設定

> 檔案: /Apache24/conf/extra/httpd-mpm.conf
```shell
# WinNT MPM
# ThreadsPerChild: constant number of worker threads in the server process
# MaxConnectionsPerChild: maximum number of connections a server process serves
<IfModule mpm_winnt_module>
ThreadsPerChild 300
MaxConnectionsPerChild 0
</IfModule>
```

> 建議上限為 `150 ~ 1000`

0 comments on commit 958e51c

Please sign in to comment.