nginx 目录美化

本文介绍了如何在已有的 Nginx 服务器上进行目录美化,主要通过动态编译添加 ngx-fancyindex 模块实现。首先,检查 Nginx 已安装模块,然后从 GitHub 下载并编译该模块,不执行 make install。接着,下载 Nginx-Fancyindex-Theme 并配置相应主题,最后在 Nginx 的 location 模块中添加配置以启用美化功能。
摘要由CSDN通过智能技术生成

nginx 目录美化 


Nginx自带基本命令 

命令 默认值 值域 作用域 EG
autoindex off on:开启目录浏览;off:关闭目录浏览 http, server, location autoindex on;打开目录浏览功能
autoindex_format html html、xml、json、jsonp 分别用这几个风格展示目录 http, server, location autoindex_format html; 以网页的风格展示目录内容。该属性在1.7.9及以上适用
autoindex_exact_size on on:展示文件字节数;off:以可读的方式显示文件大小 http, server, location autoindex_exact_size off; 以可读的方式显示文件大小,单位为 KB、MB 或者 GB,autoindex_format为html时有效
autoindex_localtime off on、off:是否以服务器的文件时间作为显示的时间 http, server, location autoindex_localtime on; 以服务器的文件时间作为显示的时间,autoindex_format为html时有效
location /download
{
    root /home/map/www/;                 
    # 指定目录所在路径
    
    autoindex on;                         
    # 开启目录浏览
    
    autoindex_format html;                 
    # 以html风格将目录展示在浏览器中
    
    autoindex_exact_size off;             
    # 切换为 off 后,以可读的方式显示文件大小,单位为 KB、MB 或者 GB
    
    autoindex_localtime on;               
    # 以服务器的文件时间作为显示的时间
    
    charset utf-8,gbk;                     
    # 展示中文文件名
}

第三方美化程序

ngx-fancyindex,

官方

https://www.nginx.com/resources/wiki/modules/fancy_index/

参考:

https://linux-sh.cn/archives/476/

动态编译添加 Nginx 模块

背景介绍

此服务器的 nginx 使用 yum 安装的。

目前还没有找到更方便的美化方法,仅能采用重新下载、安装、编译 nginx 的方法。

# 安装 nginx 所需依赖
yum install gcc gcc-c++ pcre-devel zlib-devel openssl-devel -y              

# 下载 fancyindex 美化模块
git clone https://github.com/aperezdc/ngx-fancyindex.git ~/fancyindex

# nginx 下载页面 
http://nginx.org/download/

# 下载 1.17.9 版本nginx
wget -P ~ http://nginx.org/download/nginx-1.17.9.tar.gz
tar -zxvf nginx-1.17.9.tar.gz
cd ~/nginx-1.17.9 

我的服务器已经存在编译好的 nginx,要查看 Nginx 编译了哪些模块,执行以下命令:

2>&1 nginx -V | tr ' ' '\n'|grep module

--modules-path=/usr/lib64/nginx/modules
--with-http_ssl_module
--with-http_v2_module
--with-http_realip_module
--with-stream_ssl_preread_module
--with-http_addition_module
--with-http_xslt_module=dynamic
--with-http_image_filter_module=dynamic
--with-http_sub_module
--with-http_dav_module
--with-http_flv_module
--with-http_mp4_module
--with-http_gunzip_module
--with-http_gzip_static_module
--with-http_random_index_module
--with-http_secure_link_module
--with-http_degradation_module
--with-http_slice_module
--with-http_stub_status_module
--with-http_perl_module=dynamic
--with-http_auth_request_module
--with-mail_ssl_module
--with-stream_ssl_module
--with-google_perftools_module
查看完整的编译参数:
nginx -V

nginx version: nginx/1.16.1
built by gcc 4.8.5 20150623 (Red Hat 4.8.5-39) (GCC) 
built with OpenSSL 1.0.2k-fips  26 Jan 2017
TLS SNI support enabled
configure arguments: --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E'
# 说明
./configure --prefix=/usr/share/nginx {之前 nginx 使用的模块都要加上} --add-module=../fancyindex && make


# 
./configure --prefix=/usr/share/nginx --sbin-path=/usr/sbin/nginx --modules-path=/usr/lib64/nginx/modules --conf-path=/etc/nginx/nginx.conf --error-log-path=/var/log/nginx/error.log --http-log-path=/var/log/nginx/access.log --http-client-body-temp-path=/var/lib/nginx/tmp/client_body --http-proxy-temp-path=/var/lib/nginx/tmp/proxy --http-fastcgi-temp-path=/var/lib/nginx/tmp/fastcgi --http-uwsgi-temp-path=/var/lib/nginx/tmp/uwsgi --http-scgi-temp-path=/var/lib/nginx/tmp/scgi --pid-path=/run/nginx.pid --lock-path=/run/lock/subsys/nginx --user=nginx --group=nginx --with-file-aio --with-ipv6 --with-http_ssl_module --with-http_v2_module --with-http_realip_module --with-stream_ssl_preread_module --with-http_addition_module --with-http_xslt_module=dynamic --with-http_image_filter_module=dynamic --with-http_sub_module --with-http_dav_module --with-http_flv_module --with-http_mp4_module --with-http_gunzip_module --with-http_gzip_static_module --with-http_random_index_module --with-http_secure_link_module --with-http_degradation_module --with-http_slice_module --with-http_stub_status_module --with-http_perl_module=dynamic --with-http_auth_request_module --with-mail=dynamic --with-mail_ssl_module --with-pcre --with-pcre-jit --with-stream=dynamic --with-stream_ssl_module --with-google_perftools_module --with-debug --with-cc-opt='-O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic' --with-ld-opt='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld -Wl,-E' --add-module=../fancyindex && make

验证是否支持 fancyindex 模块

/usr/share/nginx/sbin/nginx -V

 

在 GitHub 下载最新源码:ngx-fancyindex

# /usr/share/nginx 这个目录,在刚刚执行的 nginx -V 中显示
cd /usr/share/nginx


# 参考下载网址

https://github.com/aperezdc/ngx-fancyindex
https://github.com/Naereen/Nginx-Fancyindex-Theme
https://github.com/TheInsomniac/Nginx-Fancyindex-Theme

git clone https://github.com/Naereen/Nginx-Fancyindex-Theme.git

ls
html  modules  Nginx-Fancyindex-Theme
wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw==uploading.4e448015.gif转存失败重新上传取消 wAAACH5BAEKAAAALAAAAAABAAEAAAICRAEAOw== uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传 取消 uploading.4e448015.gifuploading.4e448015.gif转存失败重新上传取消 uploading.4e448015.gif转存失败 重新上传
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
要将nginx文件目录美化,可以按照以下简单方法进行操作: 1. 使用自定义样式:通过修改nginx配置文件,可以为文件目录添加自定义的CSS样式。在配置文件中找到对应的location段落,并添加以下指令: ``` location / { autoindex on; autoindex_format html; autoindex_exact_size off; autoindex_localtime on; fancyindex on; fancyindex_exact_size off; fancyindex_header "Welcome to My Server"; fancyindex_footer "Thank you for visiting"; fancyindex_ignore "README.md"; fancyindex_ignore "robots.txt"; fancyindex_ignore "favicon.ico"; fancyindex_ignore "*.php"; fancyindex_ignore "*.html"; fancyindex_ignore ".."; fancyindex_name_length 255; fancyindex_time_format "%Y-%m-%d %H:%M"; fancyindex_description_length 255; fancyindex_ignore_hidden on; fancyindex_ignore_file ".htaccess"; fancyindex_ignore_file "error_log"; fancyindex_ignore_file ".DS_Store"; fancyindex_footer_html "<p style='text-align: center;'>Powered by Nginx</p>"; fancyindex_css_href "/path/to/custom.css"; } ``` 在上述例子中,我们添加了一些配置项来控制目录的显示效果,比如自定义头部和底部的文字,忽略某些文件,设置文件名称长度等等。其中,fancyindex_css_href参数指定了CSS文件的路径。 2. 编写自定义的CSS样式表:创建一个新的CSS文件,用于定义想要的样式,比如更改颜色、字体、大小、边框等。然后将CSS文件上传至服务器指定的路径,确保在nginx配置文件中正确引用了该文件的路径。 3. 重新启动nginx服务:在完成以上步骤后,重新启动nginx服务,使配置文件生效。可以使用以下命令进行重启: ``` sudo systemctl restart nginx ``` 这样,nginx文件目录应该就会被美化并展示出自定义的样式了。可以根据需要进一步修改配置和样式,实现更加个性化的效果。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值