修改nginx.conf

添加如下内容

autoindex on; # 显示目录
autoindex_exact_size on; # 显示文件大小
autoindex_localtime on; # 显示文件时间

#  power by www.phpStudy.net
#user nobody;
worker_processes 1; error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info; #pid logs/nginx.pid; events {
worker_connections 1024;
} http {
include mime.types;
default_type application/octet-stream; log_format main '$remote_addr - $remote_user [$time_local] "$request" '
'$status $body_bytes_sent "$http_referer" '
'"$http_user_agent" "$http_x_forwarded_for"'; access_log logs/access.log main; sendfile on;
#tcp_nopush on; #keepalive_timeout 0;
keepalive_timeout 65;
#tcp_nodelay on;
fastcgi_connect_timeout 300;
fastcgi_send_timeout 300;
fastcgi_read_timeout 300;
fastcgi_buffer_size 128k;
fastcgi_buffers 4 128k;
fastcgi_busy_buffers_size 256k;
fastcgi_temp_file_write_size 256k; #gzip on;
gzip on;
gzip_min_length 1k;
gzip_buffers 4 32k;
gzip_http_version 1.1;
gzip_comp_level 2;
gzip_types text/plain application/x-javascript text/css application/xml;
gzip_vary on;
gzip_disable "MSIE [1-6]."; server_names_hash_bucket_size 128;
client_max_body_size 100m;
client_header_buffer_size 256k;
large_client_header_buffers 4 256k;
underscores_in_headers on; autoindex on; # 显示目录
autoindex_exact_size on; # 显示文件大小
autoindex_localtime on; # 显示文件时间 root "F:/work/workspace/smart/spring-smart-html/";
index index.html index.htm; server {
listen 80;
server_name 192.168.64.1 192.168.0.104 127.0.0.1;
#charset koi8-r;
#access_log logs/host.access.log main; location /smart/ {
proxy_pass http://localhost:8081/spring-smart-web/smart/;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_connect_timeout 300;
proxy_send_timeout 300;
proxy_read_timeout 300;
} location ~ .*\.(html|htm|gif|jpg|jpeg|bmp|png|ico|txt|js|css|less|map|eot|svg|ttf|woff|woff2|cab|scss|otf|exe|pdf|doc|xlsx)$ {
root "F:/work/workspace/smart/spring-smart-html/";
index index.html index.htm;
expires 1d;
}
}
include vhost/*.conf;
}

  

访问

nginx配置文服的更多相关文章

  1. 史上最全的Nginx配置文档

    Nginx是一个异步框架的Web服务器,也可以用作反向代理,负载平衡器 和 HTTP缓存.该软件由Igor Sysoev 创建,并于2004年首次公开发布.同名公司成立于2011年,以提供支持.Ngi ...

  2. Nginx配置文档具体解释

    Nginx的配置文档具体解释.在这儿做个总结,以便以后使用的时间查看. 下面大部分自己整理.部分来自參考 #设置用户 #user  nobody; #启动进程数(一般和server的CPU同样) #能 ...

  3. Rhel6-cacti+nagios+ganglia(nginx)配置文档

    (lnmp平台) 系统环境: rhel6 x86_64 iptables and selinux disabled 主机: 192.168.122.185 server85.example.com 1 ...

  4. Nginx配置文档

    转https://www.cnblogs.com/hunttown/p/5759959.html

  5. nginx配置 的话注意几点 1.错误时注意看log 2.天威证书的话,有文档按照其文档一步步配置即可;3每句话的结尾注意千万别丢掉分号

    nginx配置 的话注意几点 1.错误时注意看log  2.天威证书的话,有文档按照其文档一步步配置即可:3每句话的结尾注意千万别丢掉分号:4.配置https时 其转发可以转发到http上 pass_ ...

  6. 死磕nginx系列--配置文档解读

    nginx配置文件主要分为四个部分: main(全局设置) http ( ) upstream(负载均衡服务器设置) server(主机设置) location(URL匹配特点位置的设置) serve ...

  7. nginx 安全配置文档

    1.配置文档中有多处明确写出了nginx的配置文件路径,该路径是测试环境中的路径,线上系统的nginx配置文件与文档中所写的路径可能不一样,在进行相关配置时,应以线上配置文件的实际路径为准. 线上系统 ...

  8. (转)nginx 安全配置文档

    原文:https://www.cnblogs.com/heaven-xi/p/9961357.html#top 1.配置文档中有多处明确写出了nginx的配置文件路径,该路径是测试环境中的路径,线上系 ...

  9. Nginx 1.10.1 编译、配置文档(支持http_v2,TLSv1.2,openssl v1.0.2)

    1.安装常用工具及基础包: [root@localhost /]# yum -y install wget git vim make gcc gcc-c++ openssl-devel [root@l ...

随机推荐

  1. 京东某商品页面的简单爬取 --Pyhon网络爬虫与信息获取

    1.京东商品页面链接地址(本次要爬取的页面url) https://item.jd.hk/1953999200.html 2.代码部分 import requestsurl = "https ...

  2. centos 安装 和 linux 简单命令

    1. centos 安装 参照:https://www.cnblogs.com/tiger666/articles/10259102.html 安装过程注意点: 1. 安装过程中的选择安装Basic ...

  3. centos 7 源代码安装mysql5.6

    ###### mysql ######### 引言:这里选用mysql5.6版本,5.7版本编译时间需要几个小时. 编译安装环境: yum -y install make gcc-c++ cmake ...

  4. PHP引用赋值

    <?php/** * 在PHP 中引用的意思是用不同的名字访问同一个变量内容 * 只有有名字的变量才可以引用赋值,否则会报错 * 引用赋值 不是在内存上同体,只是把各自的值关联起来 * unse ...

  5. 求[1,n]中与m互素的个数

    void dfs(int d, ll num, int z) { if (d>cnt) { if (num!=1) ans+=z*n/num; } else { dfs(d+1,num*p[d] ...

  6. atoi函数原型

    一.atoi()函数的功能: 1.定义: 将字符串转换成整型数,跳过前面的空格字符,直到遇上数字或正负号才开始做转换,而再遇到非数字或字符串时('\0')结束转化,并将结果返回(返回转换后的整型数). ...

  7. LeetCode 958. 二叉树的完全性检验

    958. 二叉树的完全性检验  显示英文描述 我的提交返回竞赛   用户通过次数119 用户尝试次数157 通过次数123 提交次数378 题目难度Medium 给定一个二叉树,确定它是否是一个完全二 ...

  8. ORACLE SQL 函数 INITCAP()

    INITCAP() 假设c1为一字符串.函数INITCAP()是将每个单词的第一个字母大写,其它字母变为小写返回. 单词由空格,控制字符,标点符号等非字母符号限制. select initcap('h ...

  9. java调用url

    1 try { String str; URL u = new URL("https://www.baidu.com"); InputStream is = u.openStrea ...

  10. 1004. Max Consecutive Ones III最大连续1的个数 III

    网址:https://leetcode.com/problems/max-consecutive-ones-iii/ 参考:https://leetcode.com/problems/max-cons ...