gpt4 book ai didi

nginx - 本地主机上的子域与 Nginx

转载 作者:行者123 更新时间:2023-12-04 05:03:28 26 4
gpt4 key购买 nike

我想捕获 project1.localhost,这是我尝试过的 conf,但它没有捕获任何东西。

server {
listen 80;

server_name project.localhost;

location / {
proxy_pass http://127.0.0.1:3000/;
}
}

最佳答案

添加行
127.0.0.1 项目.本地主机
到您的主机文件(*nix 中的/etc/hosts)。

关于nginx - 本地主机上的子域与 Nginx,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15823003/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com