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

熱點內容
java如何生產執行bat腳本 發布:2025-09-18 16:53:25 瀏覽:552
湖北的伺服器地址是多少 發布:2025-09-18 16:51:09 瀏覽:484
神龍激活失敗缺少腳本 發布:2025-09-18 16:51:08 瀏覽:659
探探換手機號如何改密碼 發布:2025-09-18 16:50:59 瀏覽:67
公共文件伺服器訪問地址怎麼打開 發布:2025-09-18 16:44:34 瀏覽:11
小碼將編程 發布:2025-09-18 16:09:58 瀏覽:582
apn伺服器如何搭建 發布:2025-09-18 16:08:59 瀏覽:864
linuxc編譯環境搭建 發布:2025-09-18 16:07:26 瀏覽:538
11歲編程少女 發布:2025-09-18 16:04:51 瀏覽:816
電影新建文件夾圖解 發布:2025-09-18 15:55:17 瀏覽:160