pidgin/developer.pidgin.im

1af3deedc73c
Parents 72d2b7d96897
Children 75cd48c16586
Use try_files to make sure old links keep working
  • +1 -0
    Dockerfile
  • +1 -1
    README.md
  • +45 -0
    default.conf
  • --- a/Dockerfile Sun Feb 04 22:43:40 2024 -0600
    +++ b/Dockerfile Sun Feb 04 23:15:21 2024 -0600
    @@ -15,4 +15,5 @@
    FROM docker.io/nginxinc/nginx-unprivileged:bookworm
    COPY --from=build /d.p.i/ /usr/share/nginx/html/
    +COPY default.conf /etc/nginx/conf.d/
    --- a/README.md Sun Feb 04 22:43:40 2024 -0600
    +++ b/README.md Sun Feb 04 23:15:21 2024 -0600
    @@ -6,7 +6,7 @@
    The `Dockerfile` in this repository downloads the archive from
    data.imfreedom.org and throws it into an nginx container to be served
    -statically.
    +statically. We use the `try_files` nginx directive to keep old links working.
    ## Running
    --- /dev/null Thu Jan 01 00:00:00 1970 +0000
    +++ b/default.conf Sun Feb 04 23:15:21 2024 -0600
    @@ -0,0 +1,45 @@
    +server {
    + listen 8080;
    + server_name localhost;
    +
    + #access_log /var/log/nginx/host.access.log main;
    +
    + location / {
    + root /usr/share/nginx/html;
    + index index.html index.htm;
    + try_files $uri $uri/ $uri.html =404;
    + }
    +
    + #error_page 404 /404.html;
    +
    + # redirect server error pages to the static page /50x.html
    + #
    + error_page 500 502 503 504 /50x.html;
    + location = /50x.html {
    + root /usr/share/nginx/html;
    + }
    +
    + # proxy the PHP scripts to Apache listening on 127.0.0.1:80
    + #
    + #location ~ \.php$ {
    + # proxy_pass http://127.0.0.1;
    + #}
    +
    + # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
    + #
    + #location ~ \.php$ {
    + # root html;
    + # fastcgi_pass 127.0.0.1:9000;
    + # fastcgi_index index.php;
    + # fastcgi_param SCRIPT_FILENAME /scripts$fastcgi_script_name;
    + # include fastcgi_params;
    + #}
    +
    + # deny access to .htaccess files, if Apache's document root
    + # concurs with nginx's one
    + #
    + #location ~ /\.ht {
    + # deny all;
    + #}
    +}
    +