correction erreur sécurité des informations

This commit is contained in:
2026-03-27 19:09:51 +01:00
parent 7fa77d4bb1
commit 50ec9ff2c6
2 changed files with 16 additions and 4 deletions
+5 -2
View File
@@ -14,9 +14,12 @@ services:
container_name: laravel_web
restart: always
ports:
- "8000:80" # C'est ce port 8000 qu'il faudra mettre dans NPM !
- "8000:80"
- "8443:443" # HTTPS port
volumes:
- .:/var/www
- ./nginx.conf:/etc/nginx/conf.d/default.conf # On va créer ce petit fichier
- ./nginx.conf:/etc/nginx/conf.d/default.conf
- ./cert.pem:/var/www/cert.pem
- ./cert.key:/var/www/cert.key
depends_on:
- app
+11 -2
View File
@@ -1,12 +1,21 @@
server {
listen 80;
server_name localhost;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name localhost;
ssl_certificate /var/www/cert.pem;
ssl_certificate_key /var/www/cert.key;
index index.php index.html;
root /var/www/public; # ICI est le secret du "Not Found"
root /var/www/public;
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass app:9000; # Il parle au conteneur 'app'
fastcgi_pass app:9000;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;