- 2025年07月26日
- 星期六

我想做的事情如下:server_name ~^(www.)?(?subdomain[^.]+).example.org$; location / { proxy_pass http://example.org:8080/$subdomain; } 最佳答案未经测试,但请试一试:server_name ~^(w

我想使用nginx进行本地开发.这意味着我想阻止其他机器访问我的Web服务器,因此只能通过localhost访问它.在sites-enabled / default中的服务器设置下,我将代码更改为location / { # First attempt to serve request as file, then # as d