correction erreur sécurité des informations
This commit is contained in:
+5
-2
@@ -14,9 +14,12 @@ services:
|
|||||||
container_name: laravel_web
|
container_name: laravel_web
|
||||||
restart: always
|
restart: always
|
||||||
ports:
|
ports:
|
||||||
- "8000:80" # C'est ce port 8000 qu'il faudra mettre dans NPM !
|
- "8000:80"
|
||||||
|
- "8443:443" # HTTPS port
|
||||||
volumes:
|
volumes:
|
||||||
- .:/var/www
|
- .:/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:
|
depends_on:
|
||||||
- app
|
- app
|
||||||
+11
-2
@@ -1,12 +1,21 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
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;
|
index index.php index.html;
|
||||||
root /var/www/public; # ICI est le secret du "Not Found"
|
root /var/www/public;
|
||||||
|
|
||||||
location ~ \.php$ {
|
location ~ \.php$ {
|
||||||
try_files $uri =404;
|
try_files $uri =404;
|
||||||
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
fastcgi_split_path_info ^(.+\.php)(/.+)$;
|
||||||
fastcgi_pass app:9000; # Il parle au conteneur 'app'
|
fastcgi_pass app:9000;
|
||||||
fastcgi_index index.php;
|
fastcgi_index index.php;
|
||||||
include fastcgi_params;
|
include fastcgi_params;
|
||||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||||
|
|||||||
Reference in New Issue
Block a user