GithubHelp home page GithubHelp logo

erik / oop Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 0.0 17 KB

Teeny tiny personal webserver to upload static content from wherever

License: GNU Affero General Public License v3.0

Go 100.00%

oop's Introduction

oop

Simple personal file upload server.

I use this to upload files from my phone (or wherever) to my VPS, and then serve the static content using Nginx.

NOTE: There is no authentication built in. Use your actual web server to configure HTTP basic auth or something.

go get -u github.com/erik/oop

oop -port 5432 -host 127.0.0.1 \
    -uploaddir /var/www/oop \
    -url http://example.com/static/

simple nginx setup

Using Nginx as a reverse proxy to serve oop with basic authentication as well as to serve the uploaded static files.

  1. Set up your credentials using htpasswd

    sudo htpasswd -c /etc/nginx/oop.htpasswd whatever-user
  2. Update Nginx configuration

    location /uploads/ {
        proxy_pass http://localhost:12345
    
        auth_basic "protected area";
        auth_basic_user_file /etc/nginx/oop.htpasswd;
    
        client_max_body_size 50M;
    }
    
    location /static/ {
        alias /var/www/uploads/;
    }
    
  3. Run oop

    oop -port 12345 -host 127.0.0.1 \
        -url http://example.com/static/ \
        -uploaddir /var/www/uploads/

license

Available under AGPL-3.0 or later. See LICENSE for details.

oop's People

Contributors

erik avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.