當前位置:首頁 » 雲伺服器 » 文檔伺服器搭建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

熱點內容
s3哪個配置性價比高 發布:2025-03-17 13:06:09 瀏覽:317
氣體壓縮能量 發布:2025-03-17 13:00:16 瀏覽:75
壓縮油19 發布:2025-03-17 12:25:29 瀏覽:856
linux上網代理 發布:2025-03-17 12:23:56 瀏覽:359
c是高級語言嗎 發布:2025-03-17 12:16:31 瀏覽:523
python泛型 發布:2025-03-17 12:15:01 瀏覽:482
編程貓被盜 發布:2025-03-17 12:02:18 瀏覽:131
海關鎖密碼箱如何設置新密碼 發布:2025-03-17 11:53:50 瀏覽:560
農業卡號的密碼在哪裡改 發布:2025-03-17 11:48:57 瀏覽:966
楊瀾超級訪問 發布:2025-03-17 11:47:17 瀏覽:237