Skip to content

Instantly share code, notes, and snippets.

@SilentKernel
Created February 11, 2018 15:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save SilentKernel/c9c97fe658ad7b54f8a657c7fa86d0e0 to your computer and use it in GitHub Desktop.
Save SilentKernel/c9c97fe658ad7b54f8a657c7fa86d0e0 to your computer and use it in GitHub Desktop.
server {
listen *:80y;
server_name .monsite.fr;
root /homme/www/monsite;
index index.html;
# Cette "Location" n'est accessible qu'en interne, on ne peut pas y
# accéder directement depuis le navigateur.
# ici les fichiers se trouveront dans /home/www/download/ISO/
location /ISO/ {
root /home/www/download/;
internal;
}
# Activation de PHP pour download.php
location ~* ^/(?:download)\.php$ {
try_files $uri = 404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
}
# Tout autre fichier .php est interdit d'accès.
location ~* ^.+\.php$ {
return 404;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment