https://www.linode.com/docs/websites/hosting-a-website
其中的重點在於對於 1G 記憶體的 LAMP 優化設定方式, 逐一設定的參考:
Apache2:
代碼: 選擇全部
KeepAlive Off
...
<IfModule mpm_prefork_module>
StartServers 2
MinSpareServers 6
MaxSpareServers 12
MaxClients 30
MaxRequestsPerChild 3000
</IfModule>
MySQL:
代碼: 選擇全部
max_connections = 75
max_allowed_packet = 1M
thread_stack = 128K
table_open_cache = 32M
key_buffer_size = 32M
代碼: 選擇全部
max_execution_time = 30
memory_limit = 128M
error_reporting = E_COMPILE_ERROR|E_RECOVERABLE_ERROR|E_ERROR|E_CORE_ERROR
display_errors = Off
log_errors = On
error_log = /var/log/php/error.log
register_globals = Off