m0_72827839 2022-09-02 21:02 采纳率: 33.3%
浏览 16
已结题

求大手子解答,配置个简单的nginx网站,配置完文件访问不了,配置文件没有报错

#user www www;
worker_processes 1;

events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
tcp_nopush on;
keepalive_timeout 65;

##2014 config nginx

server {
    listen       80;
    server_name  www.waer1.com;
    location / {
        root   html/a;
        index  index.html index.htm;
    }
 }

 server {
    listen       80;
    server_name  www.waer2.com;
    location / {
       root   html/b;
        index  index.html index.htm;
    }
}

}
"nginx.conf" 33L, 619C 已写入
[root@jiaqi002 conf]# /usr/local/nginx/sbin/nginx -t
nginx: the configuration file /usr/local/nginx/conf/nginx.conf syntax is ok
nginx: configuration file /usr/local/nginx/conf/nginx.conf test is successful
[root@jiaqi002 conf]# /usr/local/nginx/sbin/nginx -s reload

img

  • 写回答

2条回答 默认 最新

  • 黑色鲸鱼 2022-09-05 09:30
    关注
    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 9月17日
  • 已采纳回答 9月9日
  • 创建了问题 9月2日

悬赏问题

  • ¥30 酬劳2w元求合作写文章
  • ¥15 在现有系统基础上增加功能
  • ¥15 远程桌面文档内容复制粘贴,格式会变化
  • ¥15 关于#java#的问题:找一份能快速看完mooc视频的代码
  • ¥15 这种微信登录授权 谁可以做啊
  • ¥15 请问我该如何添加自己的数据去运行蚁群算法代码
  • ¥20 用HslCommunication 连接欧姆龙 plc有时会连接失败。报异常为“未知错误”
  • ¥15 网络设备配置与管理这个该怎么弄
  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图