当前位置:首页 » 云服务器 » 文档服务器搭建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返回this 发布:2025-10-20 08:28:16 浏览:600
制作脚本网站 发布:2025-10-20 08:17:34 浏览:892
python中的init方法 发布:2025-10-20 08:17:33 浏览:586
图案密码什么意思 发布:2025-10-20 08:16:56 浏览:771
怎么清理微信视频缓存 发布:2025-10-20 08:12:37 浏览:690
c语言编译器怎么看执行过程 发布:2025-10-20 08:00:32 浏览:1017
邮箱如何填写发信服务器 发布:2025-10-20 07:45:27 浏览:261
shell脚本入门案例 发布:2025-10-20 07:44:45 浏览:120
怎么上传照片浏览上传 发布:2025-10-20 07:44:03 浏览:810
python股票数据获取 发布:2025-10-20 07:39:44 浏览:719