• Halloween is coming! To celebrate the occasion, we dusted off a couple of old skins, and even created a brand new one (Pixel).
    To get into the festive spirit, install the Skins extension.
  • The new Python extension is now available. It allows customers to deploy and manage WSGI-based Python applications on their websites directly from Plesk.
  • The Plesk Mobile apps for iOS and Android and the Plesk Mobile Center extension have been deprecated, and are no longer available for new installations. In Plesk Obsidian 18.0.84, the Plesk Mobile Center extension will be removed from servers during the upgrade, and the Plesk Mobile apps will lose their server management features.
  • The Social Login extension has been deprecated and will be removed in Plesk Obsidian 18.0.84. After that, it will no longer be possible to log in to Plesk with a Google, Facebook, GitHub account, or with a passkey. Plesk usernames and passwords, as well as logging in with a WebPros Account, are not affected.

Question nginx not doing what I want it to do

mr-wolf

Silver Pleskian
Plesk Guru
I think I have a solution for using webmail with the default LetsEncrypt certificate.
Instead of creating a special subdomain I want to patch the nginx config for all the vhosts with a certificate.

instead of https://webmail.clientdomain.com I want them to connect to https://clientdomain.com/webmail

For this purpose I patched this part of that vhost config
Code:
        location / {
                proxy_pass https://xx.xxx.xxx.xx:7081;
                proxy_set_header Host             $host;

Code:
        set $modhost $host;
        location ~ /webmail {
                rewrite ^/webmail(.*)$ $1 last;
                set $modhost webmail.$host;
        }

        location / {
                proxy_pass https://xx.xxx.xxx.xx:7081;
                proxy_set_header Host             $modhost;

Nginx is taking it and reacting on it, but when I go to https://clientdomain.com/webmail I'm getting a "500 Internal Server Error".
Is my nginx code incorrect or am I conceptually wrong?

I've already written a script that will patch all my configs and that script could be part of a cronjob.
There's not much use if the test on this domain is not working.

BTW: The site itself continues to work as it should. Maybe I'm just missing something in the rewrite??
 
Last edited:
Again....
There must be someone on this board that knows enough about nginx to know how to get this working?
 
Back
Top