Browse Source

Try with a custom, simple nginx server file

master
parent
commit
e1a93e7717
2 changed files with 28 additions and 0 deletions
  1. 1
    0
      Dockerfile
  2. 27
    0
      default.conf

+ 1
- 0
Dockerfile View File

@@ -4,6 +4,7 @@ ENV WEBROOT="/webroot/"
ENV SECRET_KEY="a1b2c3d4e5f6g7h8i9j0k"

COPY entrypoint.sh /
COPY default.conf /etc/nginx/sites-available/

RUN mkdir ${WEBROOT} && mkdir /storage && chmod +x /entrypoint.sh


+ 27
- 0
default.conf View File

@@ -0,0 +1,27 @@
server {
listen 80;
listen [::]:80;
server_name _;
root /webroot/;
client_max_body_size 100m;
access_log /dev/stdout;
error_log /dev/stdout info;
location ~ ^\/([^\/]+)\/([^\/]+)$ {
fastcgi_pass unix:/var/run/php-fpm.sock;
fastcgi_param SCRIPT_FILENAME $document_root/share_v2.php;
fastcgi_param url_p1 $1;
fastcgi_param url_p2 $2;
include fastcgi_params;
fastcgi_intercept_errors on;
}
location = / {
return 404;
}
location ~* ^\/[^\/]+\.(php|sh|conf)$ {
return 404;
}
}

Loading…
Cancel
Save