Thread tagged as: Problem, Configuration, Hosting

Licenses not working on nginx server

Hey guys

We've just hit a problem when moving from apache to nginx.

We have a single webroot for 6 domains, all running off the same webroot. The config then sets the license key and database connection according to the domain name, so we have 6 databases and 6 valid licenses.

This all works great in apache and the frontend is fine on nginx. But when we try and log in to the backend, only the master domain works, the other 5 say the license is invalid. The domains themselves haven't changed.

Happy to provide keys, admin access, and nginx config offline if that helps.


Russell Back

Russell Back 2 points

  • 6 years ago

Subscribing to updates

Rachel Andrew

Rachel Andrew 394 points
Perch Support

Please email with details of the licenses that don't work. Usually when this happens your server is reporting itself as something other than what you think it is.

Thanks Rachel. That's done.

Thanks Drew for pointing out how the license validation works and what was being reported.

We have multiple domains running off one site and nginx was reporting the master domain for all of them from $_SERVER['servern_name'].

I changed /etc/nginx/fastcgi_params from this:

fastcgi_param   SERVER_NAME             $server_name;

To this:

fastcgi_param   SERVER_NAME             $host;

And the server_name is now the correct domain and validation works.

Drew McLellan

Drew McLellan 2638 points
Perch Support

Thanks for the info, Russell!