Skip to content

dibend/localweb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Local Web

Serves directory over HTTP & HTTPS

Serves directory over HTTP & HTTPS on Ubuntu Server LTS

Installation

  1. Install dependencies:
sudo apt-get update
sudo apt-get install -y npm
  1. Install Node.js:
sudo apt-get install -y nodejs
  1. Clone this repository:
git clone https://github.com/dibend/localweb.git
  1. Navigate to the cloned repository:
cd localweb
  1. Install dependencies using npm:
npm install
  1. Create a folder named ssl and add ssl key and cert named localweb.key and localweb.crt:
mkdir ssl
sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout ssl/localweb.key -out ssl/localweb.crt

Configuration

  1. Create a file named config.json with the following content:
{
  "dir": "/home/share",
  "user": "your_username",
  "password": "<your_password_here>"
}
  1. Start the server:
node server.js

To access your files using HTTP Basic Auth, open a web browser and navigate to http://your_server_ip:port (replace with the actual IP address and port number of your server). You will be prompted to enter a username and password. Enter your_username as the username and <your_password_here> as the password.

Note: Make sure to replace your_username and <your_password_here> with your actual desired credentials. node server.js

To access your files using HTTP Basic Auth, open a web browser and navigate to `http://your_server_ip:port` (replace with the actual IP address and port number of      
your server). You will be prompted to enter a username and password. Enter `your_username` as the username and `<your_password_here>` as the password.

Note: Make sure to replace `your_username` and `<your_password_here>` with your actual desired credentials.

About

directory sharing over HTTP & HTTPS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published