nginx虚拟机无法访问解决
2024-09-05 05:19:15
、重要:修改配置文件使用虚拟机,否则怎么配置都不生效,添加如下用户 [root@host---- html]# ll /etc/nginx/nginx.conf
-rw-r--r-- root root Aug : /etc/nginx/nginx.conf
[root@host---- html]# vi /etc/nginx/nginx.conf
user root root; #说明:这里的user根据 自己的nginx.conf文件所在的目录的属主属性而定
worker_processes ; 、其他目录下的 html文件,必须写成 index.html 否则无法访问 [root@host---- ~]# curl http://127.0.0.1:8080
<html>
<head><title> Forbidden</title></head>
<body bgcolor="white">
<center><h1> Forbidden</h1></center>
<hr><center>nginx/1.12.</center>
</body>
</html>
[root@host---- ~]# mv /web/sing/sina.html /web/sing/index.html
[root@host---- ~]#
[root@host---- ~]# curl http://127.0.0.1:8080
<html>
<p>
this is my nginx
</p>
</html>
最新文章
- Web API后端调用接口 (Get,POST,Put,Delete)
- javase基础复习攻略《五》
- sqlite之WAL模式
- 使用Sharepoint定时运行Excel中宏程序
- lintcode: 生成括号
- POJ 1251 Jungle Roads
- PHP多维数组的魅力
- 如何用 React Native 创建一个iOS APP?(三)
- c# xml操作类 比较齐全
- zookeeper curator处理会话过期session expired
- 一键安装 redmine on windows 和发邮件设置
- 使用 Sonar 检测代码质量
- 【winform】DataGridView控件[表格]
- R语言-散点图阵
- Maven 基本参数
- (转)BT1120接口及协议
- jquery.ellipsis根据宽度(不是字数)进行内容截断,支持多行内容
- DOS磁盘操作类命令
- 通信与实际用例应用(消息队列和进程撰写的ATM机与消息队列的五子棋对站)
- php call_user_func_array
热门文章
- Red Hat Enterprise Linux 7.0
- vue 标题上下滚屏 无缝轮播
- CallContext线程数据缓存-调用上下文
- 6、获取Class中的方法
- 行内元素进行绝对(absolute),固定(fixed)定位后会变成块级元素&#183;
- CF70E Information Reform
- vue中把props中的值赋值给data
- 020_统计 13:30 到 14:30 所有访问 apache 服务器的请求有多少个
- windows下SVN日志反馈中文乱码的解决方法
- GitLab 如何删除 Forked from