Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/atulkamble/azurevm-website-hosting
A step-by-step guide to host a static website using Git and Mini-httpd on a Linux server.
https://github.com/atulkamble/azurevm-website-hosting
azure azurevm git httpd linux linuxserver static-website webhosting
Last synced: about 1 month ago
JSON representation
A step-by-step guide to host a static website using Git and Mini-httpd on a Linux server.
- Host: GitHub
- URL: https://github.com/atulkamble/azurevm-website-hosting
- Owner: atulkamble
- License: mit
- Created: 2024-01-28T03:23:52.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-09-24T15:21:32.000Z (3 months ago)
- Last Synced: 2024-11-15T01:08:36.890Z (about 1 month ago)
- Topics: azure, azurevm, git, httpd, linux, linuxserver, static-website, webhosting
- Language: HTML
- Homepage:
- Size: 4.03 MB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Basic - Project: Website Code | GitHub | Web Server - Hosting
This repository contains a step-by-step guide to set up and host a static website using Git and Mini-httpd on a Linux server. The process demonstrates how to clone your website code from GitHub and serve it through a simple HTTP server.
## Prerequisites
- A Linux-based virtual machine (VM) like an Ubuntu server.
- A public IP address for accessing the hosted website.
- Git installed on the server.## Steps to Set Up the Server
1. **Update the Machine**
```bash
sudo apt update -y
```2. **Install Git**
```bash
sudo apt install git -y
```3. **Install Mini-HTTPD (Web Server)**
```bash
sudo apt install mini-httpd -y
```4. **Start and Enable Mini-HTTPD**
```bash
sudo systemctl start mini-httpd
sudo systemctl enable mini-httpd
```5. **Navigate to the Web Root Directory**
```bash
cd /var/www/html
```6. **Clone the Website Repository**
Clone your website code from GitHub:
```bash
git clone https://github.com/atulkamble/testwebsite.git
```
Alternatively, clone with `sudo` for permission issues:
```bash
sudo git clone https://github.com/atulkamble/testwebsite.git
```7. **Move Website Files to the Web Directory**
```bash
sudo cp testwebsite/* .
sudo mv testwebsite/css /var/www/html
sudo mv testwebsite/js /var/www/html
sudo mv testwebsite/images /var/www/html
```8. **Access the Website**
Replace the public IP with your Azure VM's public IP and visit the website in your browser:
```
http:///
```Example:
```
http://98.70.89.130/
```## License
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.Let me know if you need any additional changes!