diff --git a/config/nginx/in-vhost.conf b/config/nginx/in-vhost.conf deleted file mode 100644 index cf262f7..0000000 --- a/config/nginx/in-vhost.conf +++ /dev/null @@ -1,34 +0,0 @@ -server { - listen 80 default_server; - server_name _; - - server_tokens off; - - client_max_body_size 100M; - - root /var/www/app/public/; - index index.php; - - 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; } - - - location ~* /storage/.*\.php$ { - return 503; - } - - location ~ \.php$ { - fastcgi_split_path_info ^(.+\.php)(/.+)$; - fastcgi_pass app:9000; - fastcgi_index index.php; - include fastcgi_params; - fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; - fastcgi_intercept_errors off; - fastcgi_buffer_size 16k; - fastcgi_buffers 4 16k; - } -} diff --git a/config/nginx/invoiceninja.conf b/config/nginx/invoiceninja.conf new file mode 100644 index 0000000..78add9d --- /dev/null +++ b/config/nginx/invoiceninja.conf @@ -0,0 +1,14 @@ +# https://nginx.org/en/docs/http/ngx_http_core_module.html +client_max_body_size 10M; +client_body_buffer_size 10M; +server_tokens off; + +# https://nginx.org/en/docs/http/ngx_http_fastcgi_module.html +fastcgi_buffers 32 16K; + +# https://nginx.org/en/docs/http/ngx_http_gzip_module.html +gzip on; +gzip_comp_level 2; +gzip_min_length 1M; +gzip_proxied any; +gzip_types *; diff --git a/config/nginx/laravel.conf b/config/nginx/laravel.conf new file mode 100644 index 0000000..5edb43a --- /dev/null +++ b/config/nginx/laravel.conf @@ -0,0 +1,32 @@ +# https://laravel.com/docs/master/deployment#nginx +server { + listen 80 default_server; + server_name _; + root /var/www/app/public; + + add_header X-Frame-Options "SAMEORIGIN"; + add_header X-Content-Type-Options "nosniff"; + + index index.php; + + charset utf-8; + + 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 app:9000; + fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name; + include fastcgi_params; + } + + location ~ /\.(?!well-known).* { + deny all; + } +}