Source: Debian 12 / Ubuntu 22.04 使用源安装 LAMP 教程
本文將介紹使用官方來源和第三方來源在Debian 12 和Ubuntu 22.04 安裝最新版Apache 2 + PHP + MySQL 的教學課程,並且可以自行選擇PHP 版本。
Continue reading »Source: Debian 12 / Ubuntu 22.04 使用源安装 LAMP 教程
本文將介紹使用官方來源和第三方來源在Debian 12 和Ubuntu 22.04 安裝最新版Apache 2 + PHP + MySQL 的教學課程,並且可以自行選擇PHP 版本。
Continue reading »Source: https://httpd.apache.org/docs/2.4/mod/mod_autoindex.html
IndexOptions Charset=UTF-8 NameWidth=*
Source: 使用 K6 對網站作壓力負載測試
K6 是一套負載測試工具 Load Testing Tool,用 Go 語言寫的,但是測試設定是用 javascript
K6 最初是 Load Impact , Load Impact 之後變成了 K6 , 再來被 Grafana 買去了
而 K6 分 Open Source 及 Cloud 產品線, Cloud 是要錢的,不過有最多 50 人模擬不用錢
底下拿 Open Source 來作測試
(如果想知道各家負載測試工具比較評筆,可看 Open source load testing tool review 2020)
Continue reading »Source: Upgrade Insecure Requests via .htaccess or meta tag to prevent mixed content
.htaccess
<ifModule mod_headers.c> Header always set Content-Security-Policy "upgrade-insecure-requests;" </IfModule>
meta.html
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Source: Upgrade Insecure Requests via .htaccess or meta tag to prevent mixed content
.htaccess
<ifModule mod_headers.c>
Header always set Content-Security-Policy "upgrade-insecure-requests;"
</IfModule>
meta.html
<meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
Source: Is it possible to enable TLS v 1.2 in Debian squeeze
Source: Update Apache2 to 2.4 on Debian 6
cd /usr/src wget https://github.com/mezentsev/OpenSSL-Backport/archive/master.zip -O OpenSSL-Backport-master.zip unzip OpenSSL-Backport-master.zip cd OpenSSL-Backport-master/openssl-1.0.1c/ dpkg-buildpackage cd .. dpkg -i *.deb apt-get install dpkg-dev apt-get install devscripts dget -x -u http://archive.debian.org/debian/pool/main/a/apache2/apache2_2.2.16-6+squeeze15.dsc cd apache2-2.2.16/ dpkg-checkbuilddeps apt-get --no-install-recommends install dpatch libaprutil1-dev libapr1-dev libpcre3-dev sharutils libcap-dev dpkg-buildpackage -us -uc -d cd .. dpkg -i apache2.2-bin*.deb
source: [Rewrite note.] 重寫規則筆記
mod_rewrite
大家應該都很熟。然後,我以前也刻了超 60 行的重寫規則,不要問我為什麼要寫那麼多!因為,舊網站資料夾切的太細,重刻網站的時候,為了不要流失搜尋引擎過來的鍊結,只好這麼做了。
Source: Stupid .htaccess Tricks
Welcome to Perishable Press! This article, Stupid .htaccess Tricks, covers just about every .htaccess “trick” in the book, and easily is the site’s most popular resource.
In addition to this tutorial, you also may want to explore the growing .htaccess archive. Along with all things .htaccess, Perishable Press also focuses on HTML, CSS, PHP, JavaScript, security, and just about every other aspect of web design, blogging, and online success. If these topics are of interest to you, I encourage you to subscribe to Perishable Press for a periodic dose of online enlightenment?;)
Source: Redirect Query String via .htaccess
In general, redirecting URLs is a piece of cake with Apache’s .htaccess. The only trick is redirecting based on the URL’s query-string value. Doing so requires slightly different directives that many people are not aware of, so it’s common to see a questions like, “why isn’t my redirect working for query strings?” This quick tutorial aims to clear up any confusion and explains how to redirect any URL based on its query string.