28 lines
696 B
Markdown
28 lines
696 B
Markdown
# ash.ley
|
|
|
|
A simple link shortener. Its a single PHP script which requires a small about of webserver configuration. Adding new links just requires adding a file to the `links/` folder containing the URL to link to.
|
|
|
|
## Webserver configuration
|
|
|
|
```nginx
|
|
server {
|
|
server_name ash.ley;
|
|
root /var/www/ash.ley;
|
|
|
|
location ~ ^/links {
|
|
deny all;
|
|
}
|
|
|
|
location / {
|
|
rewrite ^/(.*) /index.php?l=$1&$args;
|
|
}
|
|
|
|
location ~ ^/index.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_param REDIRECT_STATUS 200;
|
|
fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
|
|
}
|
|
}
|
|
```
|
|
|