server {
listen 443 ssl http2;
server_name owncloud.mondomaine.ovh;
ssl_certificate /etc/letsencrypt/live/owncloud.mondomaine.ovh/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/owncloud.mondomaine.ovh/privkey.pem;
# Add headers to serve security related headers
# Before enabling Strict-Transport-Security headers please read into this topic first.
add_header Strict-Transport-Security "max-age=15552000; includeSubDomains";
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;
# Path to the root of your installation
root /var/www/owncloud/;
# Fichiers de logs Vhost SSL
access_log /var/log/nginx/owncloud.mondomaine.ovh_ssl_access.log;
error_log /var/log/nginx/owncloud.mondomaine.ovh_ssl_error.log;
# Pages d'erreurs customisées
error_page 404 /custom_404.html;
location = /custom_404.html {
root /var/www/custom_errors;
internal; # Empeche un visiteur d'afficher la page d'erreur directement ; c'est le serveur qui renvoi la page s'il interprete qu'il s'agit d'une erreur
}
error_page 500 502 503 504 /custom_50x.html;
location = /custom_50x.html {
root /var/www/custom_errors;
internal; # Empeche un visiteur d'afficher la page directement ; c'est le serveur qui renvoi la page s'il interprete qu'il s'agit d'une erreur
}
#location /testing { # Dé-commenter pour tester le fonctionnement de la page erreur 500
# fastcgi_pass unix:/does/not/exist;
#}
# Ne pas autoriser les robots à indexer notre site
location = /robots.txt {
deny all;
log_not_found off;
access_log off;
}
include conf.d/owncloud;
}
WordPress:
J’aime chargement…