Created
February 11, 2018 15:12
-
-
Save SilentKernel/c9c97fe658ad7b54f8a657c7fa86d0e0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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