mirror of
https://github.com/YunoHost-Apps/spip_ynh.git
synced 2024-09-03 20:25:59 +02:00
rewrite dans la conf de nginx
This commit is contained in:
parent
ff728e3183
commit
d55178d4fe
2 changed files with 16 additions and 5 deletions
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
# Pour simuler une redirection Apache
|
||||
define('_SERVER_APACHE', 'false');
|
||||
define('_DIR_CONNECT', 'config');
|
||||
define('_DIR_TMP', 'tmp');
|
||||
// define('_DIR_CONNECT', 'config');
|
||||
// define('_DIR_TMP', 'tmp');
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
location __PATHTOCHANGE__ {
|
||||
alias __FINALPATH__/;
|
||||
index index.php;
|
||||
|
||||
if (!-e $request_filename)
|
||||
{
|
||||
rewrite ^(.+)$ __PATHTOCHANGE__/index.php?q=$1 last;
|
||||
|
@ -14,6 +15,16 @@ location __PATHTOCHANGE__ {
|
|||
rewrite ^ https://$server_name$request_uri? permanent;
|
||||
}
|
||||
client_max_body_size 30m;
|
||||
|
||||
# Add headers to serve security related headers
|
||||
add_header Strict-Transport-Security "max-age=15768000;";
|
||||
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 ~^/(tmp|config)/{
|
||||
return 403;
|
||||
}
|
||||
|
@ -25,7 +36,7 @@ location __PATHTOCHANGE__ {
|
|||
expires 1w;
|
||||
add_header Cache-Control public;
|
||||
}
|
||||
location /__NAMETOCHANGE__ {
|
||||
location ~ ^/__NAMETOCHANGE__ {
|
||||
# La configuration globale du site. Tout ce qui ne va dans
|
||||
# aucune autre location vas ici.
|
||||
|
||||
|
|
Loading…
Reference in a new issue