https://github.com/llgcode/httpredirect
Http Server written in Golang that make simple redirection. it support ssl, vhosts, simple serving files, http redirection
https://github.com/llgcode/httpredirect
Last synced: 10 months ago
JSON representation
Http Server written in Golang that make simple redirection. it support ssl, vhosts, simple serving files, http redirection
- Host: GitHub
- URL: https://github.com/llgcode/httpredirect
- Owner: llgcode
- License: apache-2.0
- Created: 2015-01-23T17:04:11.000Z (about 11 years ago)
- Default Branch: master
- Last Pushed: 2015-06-03T07:13:29.000Z (over 10 years ago)
- Last Synced: 2025-01-31T08:17:15.535Z (about 1 year ago)
- Language: Go
- Size: 176 KB
- Stars: 2
- Watchers: 1
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://drone.io/github.com/llgcode/httpredirect/latest)
# httpredirect
Http Server written in Golang that make simple redirection.
it support ssl, vhosts, simple serving files, http redirection
# Installation
Download the [latest executable](https://drone.io/github.com/llgcode/httpredirect/files) for your distribution.
or from source, first install [golang](http://golang.org/doc/install) and then execute this command
```
go install github.com/llgcode/httpredirect
```
# Run
```
$ httpredirect.exe --help
Usage of httpredirect.exe:
-log="": Define log file
-router="router.json": Define router file
-sslCert="": Path to certificate file
-sslKey="": Path to key file
```
# router.json
```json
{
"Port": 80,
"Redirections": [
{
"Path": "songbook.llgmusic.net/",
"URL": "http://127.0.0.1:8081/"
},
{
"Path": "www.llgmusic.net/",
"URL": "http://127.0.0.1:8082/"
},
{
"Path": "llgmusic.net/",
"URL": "http://127.0.0.1:8082/"
},
{
"Path": "/mywebapp/",
"URL": "/opt/mywebapp"
}
]
}
```