File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change 1
1
FROM php:7-apache
2
2
3
- RUN echo 'Alias "/dl" "/var/www/dl"' > /etc/apache2/conf-enabled/download-dir.conf
3
+ RUN a2enmod headers && a2enmod remoteip
4
4
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/
5
9
COPY index.php /var/www/html/
6
10
RUN mkdir /var/www/dl && chown www-data:www-data /var/www/dl
7
11
VOLUME /var/www/dl
Original file line number Diff line number Diff line change 1
1
<?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 );
7
2
if (!isset ($ _FILES ['file ' ])) {
8
3
?>
9
4
<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>file sharing</title>
31
26
exec ('mv ' .$ _FILES ['file ' ]['tmp_name ' ].' ' .$ basedir .'/ ' .$ newdir .'/ ' .$ newFName );
32
27
if (stristr ($ _SERVER ['HTTP_USER_AGENT ' ], 'curl ' )) {
33
28
echo "https:// " .$ _SERVER ['HTTP_HOST ' ]."/dl/ " .$ newdir ."/ " .$ newFName ;
29
+ echo "\n" ;
34
30
} else {
35
31
echo "https:// " .$ _SERVER ['HTTP_HOST ' ]."/dl/ " .$ newdir ."/ " .$ newFName ;
36
32
echo "\n" ;
You can’t perform that action at this time.
0 commit comments