nginx server - Forum

Forum Navigation
You need to log in to create posts and topics.

nginx server

Tengo un servidor con un proxy inverso nginx, y las conexiones a traves de la api de neocms no funcionaban, dando error de autentificación. Este problema me traia de cabeza, y al final encontre la solución, que publico por aquí por si a alguien más le pasase que pueda encontrar la solución rapidamente. Hay que añadir el siguiente codigo al archivo de configuración del dominio en nginx. Revisa el codigo antes de pegarlo en el archivo de configuración y modifica el nombre de la carpeta que contiene los archivos de "cockpit".

I have a server with a reverse proxy nginx, and the connections through the api of neocms did not work, giving authentication error. This problem was giving me a headache, and finally I found the solution, and I publish it here in case someone else has this problem and can find the solution quickly. You have to add the following code to the domain configuration file in nginx. Check the code before pasting it in the configuration file and modify the name of the folder containing the "cockpit" files.

 

# Add additional types
# Añadir tipos adicionales
include mime.types;

# Change "cockpit" to the folder name containing cockpit files.
# Cambia "cockpit" por el nombre de la carpeta que contiene los archivos de "cockpit".
location /cockpit {
 try_files $uri $uri/ /cockpit/index.php?$args;
 index index.php index.html index.htm;
}

location ~* \.php$ {
 fastcgi_param COCKPIT_URL_REWRITE On;
 fastcgi_split_path_info ^(.+\.php)(/.+)$;
 fastcgi_intercept_errors off;
 fastcgi_buffer_size 16k;
 fastcgi_buffers 4 16k;
 include         fastcgi_params;
 fastcgi_index   index.php;
 fastcgi_param   SCRIPT_FILENAME     $document_root$fastcgi_script_name;
 fastcgi_param   SCRIPT_NAME         $fastcgi_script_name;
 fastcgi_param   PATH_INFO           $fastcgi_path_info;
 # fastcgi_param COCKPIT_URL_REWRITE On;
}

location ~ .sqlite$ {
 deny all;
}

 

luishp has reacted to this post.
luishp