Skip to content

Commit e059f3f

Browse files
committed
finally commit all of these changes
1 parent 3821cd1 commit e059f3f

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

build/Dockerfile

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
FROM php:7-apache
22

3-
RUN echo 'Alias "/dl" "/var/www/dl"' > /etc/apache2/conf-enabled/download-dir.conf
3+
RUN a2enmod headers && a2enmod remoteip
44

5+
COPY download-dir.conf /etc/apache2/conf-enabled/download-dir.conf
6+
COPY reverse-proxy.conf /etc/apache2/conf-enabled/reverse-proxy.conf
7+
COPY php-errors.ini /usr/local/etc/php/conf.d/
8+
COPY php-uploads.ini /usr/local/etc/php/conf.d/
59
COPY index.php /var/www/html/
610
RUN mkdir /var/www/dl && chown www-data:www-data /var/www/dl
711
VOLUME /var/www/dl

build/index.php

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
11
<?php
2-
ini_set('upload_max_filesize', '9G');
3-
ini_set('post_max_size', '10G');
4-
ini_set('memory_limit', '10G');
5-
ini_set('max_input_time', 0);
6-
ini_set('max_execution_time', 0);
72
if(!isset($_FILES['file'])) {
83
?>
94
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>file sharing</title>
@@ -31,6 +26,7 @@
3126
exec('mv '.$_FILES['file']['tmp_name'].' '.$basedir.'/'.$newdir.'/'.$newFName);
3227
if (stristr($_SERVER['HTTP_USER_AGENT'], 'curl')) {
3328
echo "https://".$_SERVER['HTTP_HOST']."/dl/".$newdir."/".$newFName;
29+
echo "\n";
3430
} else {
3531
echo "https://".$_SERVER['HTTP_HOST']."/dl/".$newdir."/".$newFName;
3632
echo "\n";

0 commit comments

Comments
 (0)