|
|
@@ -0,0 +1,56 @@
|
|
|
+# https://laravel.com/docs/12.x/deployment#nginx
|
|
|
+
|
|
|
+server {
|
|
|
+ listen 80;
|
|
|
+ server_name {{ app_domain }};
|
|
|
+ root {{ app_deploy_target | dirname }}/current/api-v8/public;
|
|
|
+
|
|
|
+ add_header X-Frame-Options "SAMEORIGIN";
|
|
|
+ add_header X-Content-Type-Options "nosniff";
|
|
|
+
|
|
|
+ index index.php index.html;
|
|
|
+
|
|
|
+ charset utf-8;
|
|
|
+ gzip_comp_level 9;
|
|
|
+ gzip_min_length 1k;
|
|
|
+ gzip_types text/plain text/css application/xml application/javascript;
|
|
|
+ gzip_vary on;
|
|
|
+ client_max_body_size 512M;
|
|
|
+
|
|
|
+ access_log {{ app_deploy_target | dirname }}/logs/access.log;
|
|
|
+ error_log {{ app_deploy_target | dirname }}/logs/error.log warn;
|
|
|
+ # access_log syslog:server=unix:/dev/log,tag={{ app_domain }},nohostname,severity=info combined;
|
|
|
+ # error_log syslog:server=unix:/dev/log,tag={{ app_domain }},nohostname,severity=error;
|
|
|
+
|
|
|
+ location {{ app_dashboard_base_path }}/ {
|
|
|
+ alias {{ app_deploy_target | dirname }}/current/dashboard-v4/dashboard/dist/;
|
|
|
+ try_files $uri $uri/ {{ app_dashboard_base_path }}/index.html;
|
|
|
+
|
|
|
+ location ~* \.(css|js|png|jpg|jpeg|gif|gz|svg|mp4|ogg|ogv|webm|htc|xml|woff)$ {
|
|
|
+ access_log off;
|
|
|
+ expires max;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ location / {
|
|
|
+ try_files $uri $uri/ /index.php?$query_string;
|
|
|
+ }
|
|
|
+
|
|
|
+ location = /favicon.ico { access_log off; log_not_found off; }
|
|
|
+ location = /robots.txt { access_log off; log_not_found off; }
|
|
|
+
|
|
|
+ error_page 404 /index.php;
|
|
|
+
|
|
|
+ location ~ \.php$ {
|
|
|
+ fastcgi_pass php_fpm_{{ app_php_fpm_port }};
|
|
|
+ fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
|
|
+ include fastcgi_params;
|
|
|
+ fastcgi_hide_header X-Powered-By;
|
|
|
+ }
|
|
|
+
|
|
|
+ location ~ /\.(?!well-known).* {
|
|
|
+ deny all;
|
|
|
+ }
|
|
|
+
|
|
|
+}
|
|
|
+
|