Configuring a Plesk website as a reverse proxy for the control panel

Revision as of 12:44, 4 March 2023 by TCAWiki (talk | contribs) (Created page with "* Login to Plesk * Select your domain * Select Apache & nginx Settings * Uncheck "Proxy mode" * Click on Apply (this is important before continuing) * Set "Additional nginx di...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
  • Login to Plesk
  • Select your domain
  • Select Apache & nginx Settings
  • Uncheck "Proxy mode"
  • Click on Apply (this is important before continuing)
  • Set "Additional nginx directives" to the following. Replace x.x.x.x:8881 with your control panel's IP and secure port.
location / {
	proxy_pass https://x.x.x.x:8881;
	proxy_redirect off;
	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_set_header X-Forwarded-Host $server_name;
	client_max_body_size 0;
	proxy_http_version 1.1;
	proxy_request_buffering off;
	proxy_buffering                 off;
}

If "Last login" shows the incorrect IP

  • Go to servers > master > website settings.
  • Set "Web Proxy IP" to the IP that is shown.
  • Set "Web Proxy IP Header" to "X-Real-IP".
  • Save and select Tools > Restart monitor.
  • After the control panel has been restarted you need to log out and log in twice so it shows your real IP.
Retrieved from "https://help.tcadmin.com/index.php?title=Configuring_a_Plesk_website_as_a_reverse_proxy_for_the_control_panel&oldid=2535"