【发布时间】:2013-08-07 09:05:05
【问题描述】:
我正在使用 Windows 并使用 Winginx,修改 conf 文件夹下的 nginx.conf 文件。我已将监听端口的服务器块更改如下:
server{
listen 127.0.0.1:80;
log_not_found off;
charset utf-8;
access_log logs/access.log main;
location /images/ {
root home/localhost/public_html;
index index.php index.html;
}
}
images 文件夹在 winginx 的 home 文件夹下,通过 hostseditor 添加为域。但是,当我使用 URL http://images 时,出现 404 错误。
如果位置指令更改为:
location / {
}
然后一切正常。除非我匹配“/”,否则任何正则表达式都不起作用。我已阅读位置指令,但找不到任何相关原因。如果有人能指出错误,那将是很大的帮助。谢谢。
【问题讨论】:
标签: nginx webserver httpserver winginx