1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grav_ynh.git synced 2024-09-03 19:16:01 +02:00

Update package README nginx.conf et manifest

This commit is contained in:
magikcypress 2017-03-02 15:49:44 +01:00
parent ca08713086
commit d7cb0afa15
3 changed files with 113 additions and 41 deletions

View file

@ -2,6 +2,16 @@
## Grav for YunoHost ## Grav for YunoHost
## Versionning
### Version 1.1.0 (02/03/17)
- Fix Packaging [Source](https://forum.yunohost.org/t/news-about-app-management-and-packaging-in-yunohost-2-4/1379/1)
### Version 1.0.0 (11/11/15)
- First version
### Configuration ### Configuration
1. Start url https://domaine.tld/grav 1. Start url https://domaine.tld/grav

View file

@ -1,26 +1,45 @@
location PATHTOCHANGE { #--MULTISITE--if (!-e $request_filename) {
#--MULTISITE--rewrite /admin$ $scheme://$host$uri/ permanent;
#--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/.*\.php)$ __PATHTOCHANGE__$2 last;
#--MULTISITE--}
location __PATHTOCHANGE__ {
alias __FINALPATH__/;
index index.php; index index.php;
alias ALIASTOCHANGE; if (!-e $request_filename)
{
error_page 500 502 503 504 /50x.html; rewrite ^(.+)$ __PATHTOCHANGE__/index.php?q=$1 last;
location = PATHTOCHANGE/50x.html {
root html;
} }
if ($scheme = http) {
location PATHTOCHANGE { rewrite ^ https://$server_name$request_uri? permanent;
if (!-e $request_filename){ rewrite ^(.*)$ PATHTOCHANGE/$2 last; }
try_files $uri $uri/ /index.php?$args;
} }
client_max_body_size 30m;
location ~ \.php$ { # Add headers to serve security related headers
# Choose either a socket or TCP/IP address add_header Strict-Transport-Security "max-age=15768000;";
fastcgi_pass unix:/var/run/php5-fpm.sock; add_header X-Content-Type-Options nosniff;
# fastcgi_pass 127.0.0.1:9000; add_header X-Frame-Options "SAMEORIGIN";
add_header X-XSS-Protection "1; mode=block";
add_header X-Robots-Tag none;
add_header X-Download-Options noopen;
add_header X-Permitted-Cross-Domain-Policies none;
fastcgi_split_path_info ^(.+\.php)(/.+)$; location ~* \.(jpg|jpeg|gif|css|png|js|ico|swf|mp3|pdf)$ {
# Le contenu statique, est signalé au navigateur comme étant
# à garder en cache une semaine. Si il y a un proxy sur la
# route, celui-ci est autorisé à faire une copie et à la
# cacher.
expires 1w;
add_header Cache-Control public;
}
location ~ [^/]\.php(/|$) {
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
fastcgi_pass unix:/var/run/php5-fpm-__NAMETOCHANGE__.sock;
fastcgi_index index.php; fastcgi_index index.php;
include fastcgi_params; include fastcgi_params;
fastcgi_param REMOTE_USER $remote_user;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param SCRIPT_FILENAME $request_filename; fastcgi_param SCRIPT_FILENAME $request_filename;
} }
@ -34,4 +53,7 @@ location PATHTOCHANGE {
# deny access to specific files in the root folder # deny access to specific files in the root folder
location ~ /(LICENSE|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; } location ~ /(LICENSE|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; }
## End - Security ## End - Security
#--PRIVATE--# Include SSOWAT user panel.
#--PRIVATE--include conf.d/yunohost_panel.conf.inc;
} }

View file

@ -1,31 +1,44 @@
{ {
"name": "Grav", "name": "Grav",
"id": "grav", "id": "grav",
"packaging_format": 1,
"description": { "description": {
"en": "Grav - Grav is a modern open source flat-file CMS", "en": "Grav - Grav is a modern open source flat-file CMS",
"fr": "Grav - Grav is a modern open source flat-file CMS" "fr": "Grav - Grav is a modern open source flat-file CMS"
}, },
"license": "GPL-3", "version": "1.1.0",
"developer": { "url": "https://www.getgrav.org/",
"license": "free",
"maintainer": {
"name": "cyp", "name": "cyp",
"email": "cyp@rouquin.me", "email": "cyp@rouquin.me"
"url": "http://rouquin.me"
}, },
"url": "http://www.getgrav.org/", "requirements": {
"multi_instance": "true", "yunohost": ">> 2.4.0"
},
"multi_instance": true,
"services": [
"nginx",
"php5-fpm",
"mysql"
],
"arguments": { "arguments": {
"install" : [ "install" : [
{ {
"name": "domain", "name": "domain",
"type": "domain",
"ask": { "ask": {
"en": "Choose a domain for Grav" "en": "Choose a domain name for SPIP",
"fr": "Choisissez un nom de domaine pour SPIP"
}, },
"example": "domain.org" "example": "example.org"
}, },
{ {
"name": "path", "name": "path",
"type": "path",
"ask": { "ask": {
"en": "Choose a path for Grav" "en": "Choose a path for SPIP",
"fr": "Choisissez un chemin pour SPIP"
}, },
"example": "/grav", "example": "/grav",
"default": "/grav" "default": "/grav"
@ -34,10 +47,37 @@
"name": "admin", "name": "admin",
"type": "user", "type": "user",
"ask": { "ask": {
"en": "Choose the Grav administrator (must be an existing YunoHost user)", "en": "Choose the SPIP administrator (must be an existing YunoHost user)",
"fr": "Administrateur du site (doit être un utilisateur YunoHost existant)" "fr": "Administrateur du site (doit être un utilisateur YunoHost existant)"
}, },
"example": "homer" "example": "johndoe"
},
{
"name": "is_public",
"ask": {
"en": "Is it a public SPIP site ?",
"fr": "Est-ce un site public ?"
},
"choices": ["Yes", "No"],
"default": "Yes"
},
{
"name": "multisite",
"ask": {
"en": "Enable multisite option ?",
"fr": "Activer l'option multisite ?"
},
"choices": ["Yes", "No"],
"default": "No"
},
{
"name": "language",
"ask": {
"en": "Choose the application language",
"fr": "Choisissez la langue de l'application"
},
"choices": ["en_EN", "fr_FR"],
"default": "fr_FR"
} }
] ]
} }