1.在home/wwwroot/zhongjie   新建zhongjie文件夹

2.在usr/local/nginx/conf/vhost/zhongjie.conf    新建配置文件zhongjie.conf配置文件

代码如下

server
{
listen ; #.访问端口
#listen [::]:;
server_name _;
index index.html index.htm index.php default.html default.htm default.php;
root /home/wwwroot/zhongjie; # .指向目录 include other.conf;
#error_page /.html; # Deny access to PHP files in specific directory
#location ~ /(wp-content|uploads|wp-includes|images)/.*\.php$ { deny all; } include enable-php.conf; location ~ .*\.(gif|jpg|jpeg|png|bmp|swf)$
{
expires 30d;
} location ~ .*\.(js|css)?$
{
expires 12h;
} location ~ /.well-known {
allow all;
} location ~ /\.
{
deny all;
} access_log /home/wwwlogs/zhongjie.log; #.生成日志文件
}

(此代码参考lnmp默认的nginx.conf)

然后重启服务器

nginx -s reload  :修改配置后重新加载生效

最新文章

  1. Java多线程系列--“JUC集合”01之 框架
  2. net SqlBulkCopy拷贝数据的问题
  3. 模拟n步一维随机游走的情况。
  4. KMP精讲
  5. ScriptCase升级到7.01
  6. JDBC访问数据库
  7. schema workbench的操作
  8. UOJ#218. 【UNR #1】火车管理 线段树 主席树
  9. JavaScript中Ajax的用法
  10. alpha阶段发布博客
  11. 萌新 学习 vuex
  12. 艾妮记账本微信小程序开发(失败版)
  13. [LeetCode解题报告] 703. 数据流中的第K大元素
  14. countdownlatch 和 CyclicBarrier 和 Semaphore
  15. 一个linux内核模块移植到低版本时发生的异常
  16. Scala--集合
  17. String,StringBuffer和StringBuilder三者的讲解
  18. 在hive中查询导入数据表时FAILED: SemanticException [Error 10096]: Dynamic partition strict mode requires at least one static partition column. To turn this off set hive.exec.dynamic.partition.mode=nonstrict
  19. Hbase 学习笔记2----概念
  20. mysql binlog日志的三种模式

热门文章

  1. u盘引导制作工具
  2. 基于jquery结婚电子请柬特效素材
  3. Linux下nginx 的常用命令
  4. client version is higher than daemon version (client is v.1.29 daemon is v.1.22)
  5. MongoDB阅读精要
  6. FutureTask 源码分析
  7. CPP基础
  8. Knockout开发中文API系列4–绑定关键字
  9. .net dll类库 生成chm说明文档
  10. webpack3--配置多入口和多出口