mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-28 13:31:04 +00:00
fix(nginx): 修复宿主机端口映射下的跳转丢失问题
添加 absolute_redirect off 配置,并修正后台链接末尾斜杠,解决宿主机 8011 映射容器 80 时跳转丢失端口的问题
This commit is contained in:
parent
d01154d117
commit
8a42db5089
@ -35,7 +35,7 @@ $host = $_SERVER['HTTP_HOST'];
|
||||
<a href="<?php echo 'http://'.$host;?>" class="btn mid">进入前台</a>
|
||||
</div>
|
||||
<div class="admin btn">
|
||||
<a href="<?php echo 'http://'.$host;?>/admin" class="btn btn_submit J_install_btn mid">进入后台</a>
|
||||
<a href="<?php echo 'http://'.$host;?>/admin/" class="btn btn_submit J_install_btn mid">进入后台</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@ -6,6 +6,9 @@ server {
|
||||
|
||||
root /var/www/public;
|
||||
|
||||
# 端口映射场景(宿主机 8011 -> 容器 80):目录补斜杠 301 使用相对 Location,
|
||||
# 避免跳转后丢失宿主机映射端口
|
||||
absolute_redirect off;
|
||||
|
||||
location / {
|
||||
# try_files $uri /index.php$is_args$args;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user