https://github.com/hq6/purls
Personal URL Shortener
https://github.com/hq6/purls
linux url-shortener web-application
Last synced: about 1 year ago
JSON representation
Personal URL Shortener
- Host: GitHub
- URL: https://github.com/hq6/purls
- Owner: hq6
- License: mit
- Created: 2018-07-17T20:49:02.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-07-26T17:44:46.000Z (almost 8 years ago)
- Last Synced: 2025-03-29T08:32:55.558Z (over 1 year ago)
- Topics: linux, url-shortener, web-application
- Language: Python
- Size: 23.4 KB
- Stars: 17
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## purls.py
Personal URL Shortener.
Today, we can use bit.ly or goo.gl or any of the other publicly available URL
shorteners out there, but doing so limits us in the shortURLs we can choose,
because the namespace is crowded with every other user.
With the abundance of new TLDs, it is once again possible for an individual to
register a short personal domain relatively cheaply. With that domain in hand,
purls.py allows one to quickly and easily host one's own URL shortener with
minimal dependencies and almost no setup.
## Usage
purls.py runs on port 8880 by default, so if one is running Apache primarily,
the following two lines of configuration in the Apache configuration file are
sufficient to redirect the prefix /u/ to purls.py.
ProxyPass /u/ http://localhost:8880/
ProxyPassReverse /u/ http://localhost:8880/
The simplest invocation of purls.py requires only the domain prefix of the
shortened URL's to be passed. For example, if the domain prefix of the
shortened URLs is https://hq6.me/u/, I can invoke purls as follows.
python purls.py https://hq6.me/u/
## Warning
purls.py starts an **unauthenticated command shell** on port 7770 by default.
Please *make sure that this port is protected by your firewall*.
## Dependencies
* Python 2.7
* sqlite3 module.
# Demo
There is a demo running at https://hq6.me/u.
Please do not assume that short URLs created there will be persisted for any
amount of time.