當前位置:首頁 » 雲伺服器 » 文檔伺服器搭建markdown

文檔伺服器搭建markdown

發布時間: 2023-08-29 05:00:40

A. markdown nginx 搭建自己的圖片伺服器

介紹

在使用markdown格式的過程中,經常需要上傳圖片,但是常常很復雜,image,在csdn上也很麻煩,在我有阿里雲的情況下,用nginx實現我的圖片伺服器.
安裝 OpenResty

OpenResty,以前用過,所以就按照文檔快速安裝.

apt-get install libpcre3-dev libssl-dev perl make build-essential curl
./configure
make
make install

默認目錄 :/usr/local/openresty/
添加配置文件

cd /usr/local/openresty/
mkdir conf/
vi nginx.conf

配置文件具體內容

worker_processes 1;
error_log logs/error.log;
events {
worker_connections 1024;
}
http {
server {
listen 8080;
location ~ .*.(gif|jpg|jpeg|png)$ {
expires 24h;
root /home/images/;#指定圖片存放路徑
access_log /home/nginx/logs/images.log;#圖片 日誌路徑
proxy_store on;
proxy_store_access user:rw group:rw all:rw;
proxy_temp_path /home/images/;#代理臨時路徑
proxy_redirect off;

}

啟動

./openresty -c ../conf/nginx.conf

./openresty -s stop

netstat -antp

x

image
通過 SecureCRT 7.0拖拽上傳文件

image
通過 get -r * 同步文件到本地

image
訪問即可
https://blog.csdn.net/better_mouse/java/article/details/84256664

熱點內容
安卓手機如何繞過緩存軟體 發布:2025-03-16 22:35:16 瀏覽:241
c語言求職 發布:2025-03-16 22:34:23 瀏覽:429
在線教育培訓源碼 發布:2025-03-16 22:31:57 瀏覽:233
反編譯vb工具 發布:2025-03-16 22:27:04 瀏覽:353
安卓流程為什麼越來越多 發布:2025-03-16 22:26:50 瀏覽:933
五軸編程模型 發布:2025-03-16 22:17:48 瀏覽:181
linuxc函數庫 發布:2025-03-16 22:03:33 瀏覽:921
iphone最新版系統從哪裡改密碼 發布:2025-03-16 21:56:19 瀏覽:596
python的execute 發布:2025-03-16 21:40:24 瀏覽:767
今天的訪問量就靠你了 發布:2025-03-16 21:39:35 瀏覽:430