【发布时间】:2014-08-15 12:52:17
【问题描述】:
我在 EC2 服务器上运行 nginx
为了解决这个问题,我创建了一个单独的目录 usr/loca/nginx/html/test 并将 index.html 文件的副本放在那里。我从 usr/loca/nginx/html 中删除了原来的 index.html 文件
这是我的相关代码...
nginx.conf.default
worker_processes 1;
events {
worker_connections 1024;
}
http {
include mime.types;
include usr/local/nginx/conf/*.conf
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
server {
listen 80;
server_name localhost;
location / {
root html/test;
index index.html index.htm;
}
}
我尝试通过 http://'public ip address'/index.html 访问该站点,我得到的只是默认的 nginx 启动页面;即使我删除了这个文件,即使我将原始 index.html 文件中的文本更改为其他内容
我尝试重新加载 nginx 并清除缓存等.....
【问题讨论】:
标签: html http nginx amazon-ec2