mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
fix
This commit is contained in:
parent
2bec93a225
commit
657257159d
4 changed files with 87 additions and 25 deletions
78
README.md
78
README.md
|
@ -1,9 +1,73 @@
|
|||
[](https://dash.yunohost.org/appci/app/yourls)  
|
||||
# YOURLS for YunoHost
|
||||
|
||||
<h1>What is YOURLS?</h1>
|
||||
<p>YOURLS stands for Your Own URL Shortener. It is a small set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or bitly).</p>
|
||||
[](https://dash.yunohost.org/appci/app/yourls)  
|
||||
[](https://install-app.yunohost.org/?app=yourls)
|
||||
|
||||
<p>Running your own URL shortener is fun, geeky and useful: you own your data and don't depend on third party services. It's also a great way to add branding to your short URLs, instead of using the same public URL shortener everyone uses.</p><br>
|
||||
<strong>For more information see:</strong>https://yourls.org/ <br>
|
||||
<strong>Github:</strong>https://github.com/YOURLS/YOURLS <br>
|
||||
<strong>Version:</strong>1.7.6
|
||||
*[Lire ce readme en français.](./README_fr.md)*
|
||||
|
||||
> *This package allows you to install Yourls quickly and simply on a YunoHost server.
|
||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||
|
||||
## Overview
|
||||
|
||||
YOURLS stands for Your Own URL Shortener. It is a small set of PHP scripts that will allow you to run your own URL shortening service (a la TinyURL or bitly).
|
||||
|
||||
**Shipped version:** 1.7.9
|
||||
|
||||
## Screenshots
|
||||
|
||||

|
||||
|
||||
## Demo
|
||||
|
||||
* [Official demo](Link to a demo site for this app.)
|
||||
|
||||
|
||||
## Configuration
|
||||
|
||||
How to configure this app: From an admin panel, a plain file with SSH, or any other way.
|
||||
|
||||
## Documentation
|
||||
|
||||
* Official documentation: Link to the official documentation of this app
|
||||
* YunoHost documentation: If specific documentation is needed, feel free to contribute.
|
||||
|
||||
## YunoHost specific features
|
||||
|
||||
#### Multi-user support
|
||||
|
||||
* Are LDAP and HTTP auth supported?
|
||||
* Can the app be used by multiple users?
|
||||
|
||||
#### Supported architectures
|
||||
|
||||
* x86-64 - [](https://ci-apps.yunohost.org/ci/apps/yourls/)
|
||||
* ARMv8-A - [](https://ci-apps-arm.yunohost.org/ci/apps/yourls/)
|
||||
|
||||
## Limitations
|
||||
|
||||
* Any known limitations.
|
||||
|
||||
## Additional information
|
||||
|
||||
* Other info you would like to add about this app.
|
||||
|
||||
## Links
|
||||
|
||||
* Report a bug: https://github.com/YunoHost-Apps/REPLACEBYYOURAPP_ynh/issues
|
||||
* App website: https://yourls.org/
|
||||
* Upstream app repository: https://github.com/YOURLS/YOURLS
|
||||
* YunoHost website: https://yunohost.org/
|
||||
|
||||
---
|
||||
|
||||
## Developer info
|
||||
|
||||
Please send your pull request to the [testing branch](https://github.com/YunoHost-Apps/yourls_ynh/tree/testing).
|
||||
|
||||
To try the testing branch, please proceed like that.
|
||||
```
|
||||
sudo yunohost app install https://github.com/YunoHost-Apps/yourls_ynh/tree/testing --debug
|
||||
or
|
||||
sudo yunohost app upgrade yourls -u https://github.com/YunoHost-Apps/yourls_ynh/tree/testing --debug
|
||||
```
|
||||
|
|
|
@ -8,20 +8,20 @@
|
|||
*/
|
||||
|
||||
/** MySQL database username */
|
||||
define( 'YOURLS_DB_USER', 'yunouser' );
|
||||
define( 'YOURLS_DB_USER', '__DB_NAME__' );
|
||||
|
||||
/** MySQL database password */
|
||||
define( 'YOURLS_DB_PASS', 'yunopass' );
|
||||
define( 'YOURLS_DB_PASS', '__DB_PASSWORD__' );
|
||||
|
||||
/** The name of the database for YOURLS */
|
||||
define( 'YOURLS_DB_NAME', 'yunobase' );
|
||||
define( 'YOURLS_DB_NAME', '__DB_NAME__' );
|
||||
|
||||
/** MySQL hostname.
|
||||
** If using a non standard port, specify it like 'hostname:port', eg. 'localhost:9999' or '127.0.0.1:666' */
|
||||
define( 'YOURLS_DB_HOST', 'localhost' );
|
||||
|
||||
/** MySQL tables prefix */
|
||||
define( 'YOURLS_DB_PREFIX', 'yourls_' );
|
||||
define( 'YOURLS_DB_PREFIX', '__DB_NAME___' );
|
||||
|
||||
/*
|
||||
** Site options
|
||||
|
@ -29,7 +29,7 @@ define( 'YOURLS_DB_PREFIX', 'yourls_' );
|
|||
|
||||
/** YOURLS installation URL -- all lowercase and with no trailing slash.
|
||||
** If you define it to "http://site.com", don't use "http://www.site.com" in your browser (and vice-versa) */
|
||||
define( 'YOURLS_SITE', 'https://yunodomain_yourlspath' );
|
||||
define( 'YOURLS_SITE', 'https://__DOMAIN____PATH__' );
|
||||
|
||||
/** Timezone GMT offset */
|
||||
define( 'YOURLS_HOURS_OFFSET', 0 );
|
||||
|
|
|
@ -1,18 +1,19 @@
|
|||
location __PATH__ {
|
||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||
location __PATH__/ {
|
||||
|
||||
alias __FINALPATH__/;
|
||||
|
||||
# Force usage of https
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
if ($scheme = http) {
|
||||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
|
||||
try_files $uri $uri/ __PATHTOCHANGE__/yourls-loader.php;
|
||||
try_files $uri $uri/ __FINALPATH__/yourls-loader.php;
|
||||
|
||||
|
||||
index index.php index.html index.htm;
|
||||
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
fastcgi_pass unix:/var/run/php__PHPVERSION__-fpm-__NAME__.sock;
|
||||
fastcgi_index index.php;
|
||||
|
@ -22,7 +23,6 @@ location __PATH__ {
|
|||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||
}
|
||||
|
||||
|
||||
# Include SSOWAT user panel.
|
||||
include conf.d/yunohost_panel.conf.inc;
|
||||
}
|
||||
|
|
|
@ -34,10 +34,8 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
# CHECK IF THE APP CAN BE INSTALLED WITH THESE ARGS
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Validating installation parameters..." --time --weight=1
|
||||
ynh_script_progression --message="Validating installation parameters..." --weight=1
|
||||
|
||||
### If the app uses nginx as web server (written in HTML/PHP in most cases), the final path should be "/var/www/$app".
|
||||
### If the app provides an internal web server (or uses another application server such as uwsgi), the final path should be "/opt/yunohost/$app"
|
||||
final_path=/var/www/$app
|
||||
test ! -e "$final_path" || ynh_die --message="This path already contains a folder"
|
||||
|
||||
|
@ -47,7 +45,7 @@ ynh_webpath_register --app=$app --domain=$domain --path_url=$path_url
|
|||
#=================================================
|
||||
# STORE SETTINGS FROM MANIFEST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Storing installation settings..." --time --weight=1
|
||||
ynh_script_progression --message="Storing installation settings..." --weight=1
|
||||
|
||||
ynh_app_setting_set --app=$app --key=domain --value=$domain
|
||||
ynh_app_setting_set --app=$app --key=path --value=$path_url
|
||||
|
|
Loading…
Add table
Reference in a new issue