lnmp手动新建虚拟机
2024-09-19 21:14:04
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 :修改配置后重新加载生效
最新文章
- Java多线程系列--“JUC集合”01之 框架
- net SqlBulkCopy拷贝数据的问题
- 模拟n步一维随机游走的情况。
- KMP精讲
- ScriptCase升级到7.01
- JDBC访问数据库
- schema workbench的操作
- UOJ#218. 【UNR #1】火车管理 线段树 主席树
- JavaScript中Ajax的用法
- alpha阶段发布博客
- 萌新 学习 vuex
- 艾妮记账本微信小程序开发(失败版)
- [LeetCode解题报告] 703. 数据流中的第K大元素
- countdownlatch 和 CyclicBarrier 和 Semaphore
- 一个linux内核模块移植到低版本时发生的异常
- Scala--集合
- String,StringBuffer和StringBuilder三者的讲解
- 在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
- Hbase 学习笔记2----概念
- mysql binlog日志的三种模式