Skip to content

Jeff42820/uploads-yapfu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

uploads-yapfu

File Uploader - all-in-one php file

Description

This software is designed to download/upload files from/to a web server. You forgot your Usb key ? It can help.

It uses the basic authentification (AuthType Basic, auth_basic) for login possibilities, so each user has its private directory.

Snapshot

snapshot-1

Installation

Create an empty directory under the server root dir and download upload.php in it. Then change the ownership and permissions of this dir. NB: You can rename upload.php index.php in order to have a simple url.

Example for Debian :

sudo mkdir /var/www/html/uploads
sudo chown root:www-data  /var/www/html/uploads
sudo chmod 770 /var/www/html/uploads
cd /var/www/uploads
sudo cp upload.php /var/www/html/uploads/index.php
sudo chown root:root  /var/www/html/uploads/index.php
sudo chmod 644 /var/www/html/uploads/index.php

Server configuration

Apache2 :

<Directory "/var/www/html/uploads">
  AuthType Basic
  AuthUserFile /etc/nginx/.htpasswd
  AuthGroupFile /dev/null
  AuthName "Please Enter Password"
  Require valid-user
  Allowoverride None
</Directory>

Nginx :

server {
  listen 80 default_server;
  listen [::]:80 default_server;
  root /var/www/html;
  # ( ...... )
  location /uploads {
    auth_basic "Enter your password";
    auth_basic_user_file  /etc/nginx/.htpasswd;
  }
}

Create .htpasswd

sudo htpasswd -c /etc/nginx/.htpasswd user1
sudo htpasswd    /etc/nginx/.htpasswd user2

About

File Uploader - only one php file

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages