location /admin {
#  proxy_pass http://127.0.0.1:{{ apache_port }}/admin;
   alias /opt/admin/console;
   auth_pam                "Secure zone";
   auth_pam_service_name   "nginx";

}

location ~ /admin/(.*)\.php$ {
    alias /opt/admin/console/$1.php;
    proxy_set_header X-Real-IP  $remote_addr;
    proxy_set_header X-Forwarded-For $remote_addr;
    proxy_set_header Host $host;
    fastcgi_pass php;
    fastcgi_index index.php;
    fastcgi_split_path_info ^(.+\.php)(/.+)$;
    fastcgi_param   SCRIPT_FILENAME    $document_root$fastcgi_script_name;
    fastcgi_param   SCRIPT_NAME        $fastcgi_script_name;
    include fastcgi_params;
}
 
location /cmd-service {
#  proxy_pass http://127.0.0.1:{{ apache_port }}/cmd-service;
   include uwsgi_params;
   uwsgi_pass unix:///tmp/admin-console.sock;
}

  

