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:
parent
ca08713086
commit
d7cb0afa15
3 changed files with 113 additions and 41 deletions
10
README.md
10
README.md
|
@ -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
|
||||||
|
|
|
@ -1,37 +1,59 @@
|
||||||
location PATHTOCHANGE {
|
#--MULTISITE--if (!-e $request_filename) {
|
||||||
index index.php;
|
#--MULTISITE--rewrite /admin$ $scheme://$host$uri/ permanent;
|
||||||
|
#--MULTISITE--rewrite ^__PATHTOCHANGE__(/[^/]+)?(/.*\.php)$ __PATHTOCHANGE__$2 last;
|
||||||
|
#--MULTISITE--}
|
||||||
|
|
||||||
alias ALIASTOCHANGE;
|
location __PATHTOCHANGE__ {
|
||||||
|
alias __FINALPATH__/;
|
||||||
|
index index.php;
|
||||||
|
|
||||||
error_page 500 502 503 504 /50x.html;
|
if (!-e $request_filename)
|
||||||
location = PATHTOCHANGE/50x.html {
|
{
|
||||||
root html;
|
rewrite ^(.+)$ __PATHTOCHANGE__/index.php?q=$1 last;
|
||||||
}
|
}
|
||||||
|
if ($scheme = http) {
|
||||||
|
rewrite ^ https://$server_name$request_uri? permanent;
|
||||||
|
}
|
||||||
|
client_max_body_size 30m;
|
||||||
|
|
||||||
location PATHTOCHANGE {
|
# Add headers to serve security related headers
|
||||||
if (!-e $request_filename){ rewrite ^(.*)$ PATHTOCHANGE/$2 last; }
|
add_header Strict-Transport-Security "max-age=15768000;";
|
||||||
try_files $uri $uri/ /index.php?$args;
|
add_header X-Content-Type-Options nosniff;
|
||||||
}
|
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;
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~* \.(jpg|jpeg|gif|css|png|js|ico|swf|mp3|pdf)$ {
|
||||||
# Choose either a socket or TCP/IP address
|
# Le contenu statique, est signalé au navigateur comme étant
|
||||||
fastcgi_pass unix:/var/run/php5-fpm.sock;
|
# à garder en cache une semaine. Si il y a un proxy sur la
|
||||||
# fastcgi_pass 127.0.0.1:9000;
|
# 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;
|
||||||
|
include fastcgi_params;
|
||||||
|
fastcgi_param REMOTE_USER $remote_user;
|
||||||
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||||
|
fastcgi_param SCRIPT_FILENAME $request_filename;
|
||||||
|
}
|
||||||
|
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
## Begin - Security
|
||||||
fastcgi_index index.php;
|
# deny all direct access for these folders
|
||||||
include fastcgi_params;
|
location ~* /(.git|cache|bin|logs|backups)/.*$ { return 403; }
|
||||||
fastcgi_param SCRIPT_FILENAME $request_filename;
|
# deny running scripts inside core system folders
|
||||||
}
|
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||||
|
# deny running scripts inside user folder
|
||||||
|
location ~* /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
||||||
|
# deny access to specific files in the root folder
|
||||||
|
location ~ /(LICENSE|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; }
|
||||||
|
## End - Security
|
||||||
|
|
||||||
## Begin - Security
|
#--PRIVATE--# Include SSOWAT user panel.
|
||||||
# deny all direct access for these folders
|
#--PRIVATE--include conf.d/yunohost_panel.conf.inc;
|
||||||
location ~* /(.git|cache|bin|logs|backups)/.*$ { return 403; }
|
|
||||||
# deny running scripts inside core system folders
|
|
||||||
location ~* /(system|vendor)/.*\.(txt|xml|md|html|yaml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
|
||||||
# deny running scripts inside user folder
|
|
||||||
location ~* /user/.*\.(txt|md|yaml|php|pl|py|cgi|twig|sh|bat)$ { return 403; }
|
|
||||||
# deny access to specific files in the root folder
|
|
||||||
location ~ /(LICENSE|composer.lock|composer.json|nginx.conf|web.config|htaccess.txt|\.htaccess) { return 403; }
|
|
||||||
## End - Security
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -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"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue