Browse Source

Nginx para Omeka-S PHPFPM

master
Siroco 2 months ago
commit
07ba7b1de4
Signed by: siroco GPG Key ID: 1324098302A514B0
4 changed files with 81 additions and 0 deletions
  1. +16
    -0
      Dockerfile
  2. +11
    -0
      README.md
  3. +25
    -0
      fastcgi_params
  4. +29
    -0
      sd.conf

+ 16
- 0
Dockerfile View File

@ -0,0 +1,16 @@
FROM registry.sindominio.net/debian
RUN apt-get update && \
apt-get -qy install nginx-full &&\
apt-get clean
COPY sd.conf /etc/nginx/sites-available/sd.conf
COPY fastcgi_params /etc/nginx/fastcgi_params
RUN rm /etc/nginx/sites-enabled/default
RUN ln -s /etc/nginx/sites-available/sd.conf /etc/nginx/sites-enabled/sd.conf
VOLUME /sindominio/
EXPOSE 80
CMD /usr/sbin/nginx -g "daemon off; master_process off;"

+ 11
- 0
README.md View File

@ -0,0 +1,11 @@
# NGINX para Omeka-S
Imagen de _NGINX_ que hace de proxy para un _PHP-FPM_
Deben compartir el mismo volumen para poder usar la misma instalación de _Omeka S_
El _root_ de ficheros se encuentra en el el volumen _/sindominio/omeka-s_
Se puede modificar el config en _sd.conf_
Y los parametros del proxy php en el fichero de parametros _fastcgi_params_

+ 25
- 0
fastcgi_params View File

@ -0,0 +1,25 @@
fastcgi_param QUERY_STRING $query_string;
fastcgi_param REQUEST_METHOD $request_method;
fastcgi_param CONTENT_TYPE $content_type;
fastcgi_param CONTENT_LENGTH $content_length;
fastcgi_param SCRIPT_NAME $fastcgi_script_name;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param REQUEST_URI $request_uri;
fastcgi_param DOCUMENT_URI $document_uri;
fastcgi_param DOCUMENT_ROOT $document_root;
fastcgi_param SERVER_PROTOCOL $server_protocol;
fastcgi_param REQUEST_SCHEME $scheme;
fastcgi_param HTTPS $https if_not_empty;
fastcgi_param GATEWAY_INTERFACE CGI/1.1;
fastcgi_param SERVER_SOFTWARE nginx/$nginx_version;
fastcgi_param REMOTE_ADDR $remote_addr;
fastcgi_param REMOTE_PORT $remote_port;
fastcgi_param SERVER_ADDR $server_addr;
fastcgi_param SERVER_PORT $server_port;
fastcgi_param SERVER_NAME $server_name;
# PHP only, required if PHP was built with --enable-force-cgi-redirect
fastcgi_param REDIRECT_STATUS 200;

+ 29
- 0
sd.conf View File

@ -0,0 +1,29 @@
server {
listen 80;
listen [::]:80;
server_name default_server;
root /sindominio/omeka-s;
index index.php;
client_max_body_size 25M;
location / {
try_files $uri $uri/ /index.php?$args ;
}
location ~ \.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_read_timeout 300;
fastcgi_send_timeout 300;
fastcgi_pass phpfpm:9000;
}
access_log /var/log/nginx/access.log;
error_log /var/log/nginx/error.log;
}

Loading…
Cancel
Save