1

Is it possible to have a MySQL query in my Nginx config?

For example:

server {
        listen       80;
        $domain = [a way to get the current domain];
        $server_info = [a way to do the query (by $domain) and have some info returned];
        server_name $serverinfo;
        [do stuff]
}
  • 1
    Have a look at this NginX module (might be a bit outdated btw) – j0k Jun 18 '13 at 8:00
1

(Answer by @jOk)
You can use the NginX moudule located at https://github.com/arut/nginx-mysql-module which allows you to do exactly what you are asking to do.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.