[GH-ISSUE #2450] nginx reverse #1683

Closed
opened 2026-10-31 20:20:25 +07:00 by bsakaguchi · 8 comments
Owner

Originally created by @okaya0x on GitHub (Aug 8, 2024).
Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2450

Describe the bug
A clear and concise description of what the bug is.

Expected behavior
A clear and concise description of what you expected to happen.

Screenshots
If applicable, add screenshots to help explain your problem.

Version (please complete the following information):

  • 3X-UI Version : 2.3.12
  • Xray Version : 1.8.23

Additional context
Add any other context about the problem here.

nginx.conf
location ^~ /demo {
if ($scheme = http) {
return 301 https://$host$request_uri;
}
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_pass http://127.0.0.1:1234/demo;

When I just click the restart panel button, the nginx reverse proxy port will jump from 443 to 1234. Clicking other buttons on the browser is normal.

Originally created by @okaya0x on GitHub (Aug 8, 2024). Original GitHub issue: https://github.com/MHSanaei/3x-ui/issues/2450 **Describe the bug** A clear and concise description of what the bug is. **Expected behavior** A clear and concise description of what you expected to happen. **Screenshots** If applicable, add screenshots to help explain your problem. **Version (please complete the following information):** - 3X-UI Version : 2.3.12 - Xray Version : 1.8.23 **Additional context** Add any other context about the problem here. nginx.conf location ^~ /demo { if ($scheme = http) { return 301 https://$host$request_uri; } proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_pass http://127.0.0.1:1234/demo; When I just click the restart panel button, the nginx reverse proxy port will jump from 443 to 1234. Clicking other buttons on the browser is normal.
bsakaguchi 2026-10-31 20:20:25 +07:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@cqdjbb commented on GitHub (Aug 8, 2024):

It seems that this problem exists in all versions after 2.3.8. I thought it would be fixed in later versions. I update it every time a new version is released, but the problem seems to exist all the time.

<!-- gh-comment-id:2275099998 --> @cqdjbb commented on GitHub (Aug 8, 2024): It seems that this problem exists in all versions after 2.3.8. I thought it would be fixed in later versions. I update it every time a new version is released, but the problem seems to exist all the time.
Author
Owner

@MHSanaei commented on GitHub (Aug 8, 2024):

download the file from here
https://github.com/MHSanaei/3x-ui/actions/runs/10305209970
then unzip it and upload it to your server then use this code to install it

ARCH=$(uname -m)
case "${ARCH}" in
  x86_64 | x64 | amd64) XUI_ARCH="amd64" ;;
  i*86 | x86) XUI_ARCH="386" ;;
  armv8* | armv8 | arm64 | aarch64) XUI_ARCH="arm64" ;;
  armv7* | armv7) XUI_ARCH="armv7" ;;
  armv6* | armv6) XUI_ARCH="armv6" ;;
  armv5* | armv5) XUI_ARCH="armv5" ;;
  s390x) echo 's390x' ;;
  *) XUI_ARCH="amd64" ;;
esac

cd /root/
rm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui
tar zxvf x-ui-linux-${XUI_ARCH}.tar.gz
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
cp x-ui/x-ui.sh /usr/bin/x-ui
cp -f x-ui/x-ui.service /etc/systemd/system/
mv x-ui/ /usr/local/
systemctl daemon-reload
systemctl enable x-ui
systemctl restart x-ui
<!-- gh-comment-id:2275304283 --> @MHSanaei commented on GitHub (Aug 8, 2024): download the file from here https://github.com/MHSanaei/3x-ui/actions/runs/10305209970 then unzip it and upload it to your server then use this code to install it ``` ARCH=$(uname -m) case "${ARCH}" in x86_64 | x64 | amd64) XUI_ARCH="amd64" ;; i*86 | x86) XUI_ARCH="386" ;; armv8* | armv8 | arm64 | aarch64) XUI_ARCH="arm64" ;; armv7* | armv7) XUI_ARCH="armv7" ;; armv6* | armv6) XUI_ARCH="armv6" ;; armv5* | armv5) XUI_ARCH="armv5" ;; s390x) echo 's390x' ;; *) XUI_ARCH="amd64" ;; esac cd /root/ rm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui tar zxvf x-ui-linux-${XUI_ARCH}.tar.gz chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh cp x-ui/x-ui.sh /usr/bin/x-ui cp -f x-ui/x-ui.service /etc/systemd/system/ mv x-ui/ /usr/local/ systemctl daemon-reload systemctl enable x-ui systemctl restart x-ui ```
Author
Owner

@okaya0x commented on GitHub (Aug 8, 2024):

download the file from here https://github.com/MHSanaei/3x-ui/actions/runs/10299018506 then unzip it and upload it to your server then use this code to install it

ARCH=$(uname -m)
case "${ARCH}" in
  x86_64 | x64 | amd64) XUI_ARCH="amd64" ;;
  i*86 | x86) XUI_ARCH="386" ;;
  armv8* | armv8 | arm64 | aarch64) XUI_ARCH="arm64" ;;
  armv7* | armv7) XUI_ARCH="armv7" ;;
  armv6* | armv6) XUI_ARCH="armv6" ;;
  armv5* | armv5) XUI_ARCH="armv5" ;;
  s390x) echo 's390x' ;;
  *) XUI_ARCH="amd64" ;;
esac

cd /root/
rm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui
tar zxvf x-ui-linux-${XUI_ARCH}.tar.gz
chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh
cp x-ui/x-ui.sh /usr/bin/x-ui
cp -f x-ui/x-ui.service /etc/systemd/system/
mv x-ui/ /usr/local/
systemctl daemon-reload
systemctl enable x-ui
systemctl restart x-ui

After update
The problem is still
Original link https://panel.abc.com/demo/panel/settings
After clicking Restart Panel --Sure --loading Jump to new link https://panel.abc.com:1234/demo/panel/settings

<!-- gh-comment-id:2275648294 --> @okaya0x commented on GitHub (Aug 8, 2024): > download the file from here https://github.com/MHSanaei/3x-ui/actions/runs/10299018506 then unzip it and upload it to your server then use this code to install it > > ``` > ARCH=$(uname -m) > case "${ARCH}" in > x86_64 | x64 | amd64) XUI_ARCH="amd64" ;; > i*86 | x86) XUI_ARCH="386" ;; > armv8* | armv8 | arm64 | aarch64) XUI_ARCH="arm64" ;; > armv7* | armv7) XUI_ARCH="armv7" ;; > armv6* | armv6) XUI_ARCH="armv6" ;; > armv5* | armv5) XUI_ARCH="armv5" ;; > s390x) echo 's390x' ;; > *) XUI_ARCH="amd64" ;; > esac > > cd /root/ > rm -rf x-ui/ /usr/local/x-ui/ /usr/bin/x-ui > tar zxvf x-ui-linux-${XUI_ARCH}.tar.gz > chmod +x x-ui/x-ui x-ui/bin/xray-linux-* x-ui/x-ui.sh > cp x-ui/x-ui.sh /usr/bin/x-ui > cp -f x-ui/x-ui.service /etc/systemd/system/ > mv x-ui/ /usr/local/ > systemctl daemon-reload > systemctl enable x-ui > systemctl restart x-ui > ``` After update The problem is still Original link https://panel.abc.com/demo/panel/settings After clicking Restart Panel --Sure --loading Jump to new link https://panel.abc.com:1234/demo/panel/settings
Author
Owner

@MHSanaei commented on GitHub (Aug 8, 2024):

If you install that file correctly it should work well

<!-- gh-comment-id:2276049085 --> @MHSanaei commented on GitHub (Aug 8, 2024): If you install that file correctly it should work well
Author
Owner

@okaya0x commented on GitHub (Aug 8, 2024):

If you install that file correctly it should work well

Follow your prompts to update the files
sha1sum 815fc410a61ebf05f026f016827b46723ea21d65 /usr/local/x-ui/x-ui
https://github.com/alireza0/x-ui no problem

<!-- gh-comment-id:2276062350 --> @okaya0x commented on GitHub (Aug 8, 2024): > If you install that file correctly it should work well Follow your prompts to update the files sha1sum 815fc410a61ebf05f026f016827b46723ea21d65 /usr/local/x-ui/x-ui https://github.com/alireza0/x-ui no problem
Author
Owner

@MHSanaei commented on GitHub (Aug 8, 2024):

I changed it to alireza code
try download this
https://github.com/MHSanaei/3x-ui/actions/runs/10305209970
then unzip it and upload tar.gz to your root with FTP then use that code

<!-- gh-comment-id:2276167790 --> @MHSanaei commented on GitHub (Aug 8, 2024): I changed it to alireza code try download this https://github.com/MHSanaei/3x-ui/actions/runs/10305209970 then unzip it and upload tar.gz to your root with FTP then use that code
Author
Owner

@okaya0x commented on GitHub (Aug 8, 2024):

I changed it to alireza code try download this https://github.com/MHSanaei/3x-ui/actions/runs/10305209970 then unzip it and upload tar.gz to your root with FTP then use that code

The problem still exists. If I replace the binary file in /usr/local/x-ui/x-ui with the binary file of alireza link https://github.com/alireza0/x-ui/releases/download/1.8.5/x-ui-linux-amd64.tar.gz, there is no problem.

<!-- gh-comment-id:2276255285 --> @okaya0x commented on GitHub (Aug 8, 2024): > I changed it to alireza code try download this https://github.com/MHSanaei/3x-ui/actions/runs/10305209970 then unzip it and upload tar.gz to your root with FTP then use that code The problem still exists. If I replace the binary file in /usr/local/x-ui/x-ui with the binary file of alireza link https://github.com/alireza0/x-ui/releases/download/1.8.5/x-ui-linux-amd64.tar.gz, there is no problem.
Author
Owner

@vahiidsharifi-code commented on GitHub (May 21, 2026):

سلام تو ورژن جدید در قسمت xray config دکمه reverse وجود ندارد چطور میتونم فعالش کنم ؟

<!-- gh-comment-id:4512249652 --> @vahiidsharifi-code commented on GitHub (May 21, 2026): سلام تو ورژن جدید در قسمت xray config دکمه reverse وجود ندارد چطور میتونم فعالش کنم ؟
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MHSanaei/3x-ui#1683
No description provided.