ca marche pas donc on revient au truc d'avant qui marchait
Deploy PHP / deploy (push) Successful in 32s
Deploy PHP / deploy (push) Successful in 32s
This commit is contained in:
+36
-21
@@ -7,34 +7,49 @@ data:
|
||||
default.conf: |
|
||||
server {
|
||||
listen 80;
|
||||
|
||||
root /var/www/html;
|
||||
index index.php index.html;
|
||||
|
||||
# ---------------- VUE SPA (IMPORTANT)
|
||||
location /VUEJS/ {
|
||||
alias /var/www/html/VUEJS/myapp/dist/;
|
||||
|
||||
index index.html;
|
||||
|
||||
try_files $uri $uri/ /index.html;
|
||||
types {
|
||||
text/html html htm;
|
||||
text/css css;
|
||||
application/javascript js;
|
||||
application/json json;
|
||||
text/yaml yml yaml;
|
||||
image/png png;
|
||||
image/jpeg jpg jpeg;
|
||||
image/svg+xml svg;
|
||||
image/gif gif;
|
||||
image/webp webp;
|
||||
font/woff woff;
|
||||
font/woff2 woff2;
|
||||
}
|
||||
|
||||
# ---------------- ASSETS (Vite)
|
||||
location /VUEJS/assets/ {
|
||||
alias /var/www/html/VUEJS/myapp/dist/assets/;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public";
|
||||
try_files $uri =404;
|
||||
location /VUEJS/myapp/dist/ {
|
||||
alias /var/www/html/VUEJS/myapp/dist/;
|
||||
index index.html;
|
||||
try_files $uri $uri/ /index.html;
|
||||
}
|
||||
|
||||
# ---------------- FAVICON
|
||||
location = /VUEJS/favicon.ico {
|
||||
alias /var/www/html/VUEJS/myapp/dist/favicon.ico;
|
||||
access_log off;
|
||||
location /VUEJS/myapp/dist/assets/ {
|
||||
alias /var/www/html/VUEJS/myapp/dist/assets/;
|
||||
access_log off;
|
||||
expires 1y;
|
||||
add_header Cache-Control "public";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$query_string;
|
||||
}
|
||||
|
||||
# ---------------- BLOQUE PHP (important pour éviter 500)
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
include fastcgi_params;
|
||||
}
|
||||
}
|
||||
|
||||
location ~ /\.git {
|
||||
deny all;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user