-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathlaravel.conf
49 lines (39 loc) · 1.23 KB
/
laravel.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
server {
# Laravel service with PHP 7.4 service example for https://github.com/bagart/laradock-multi
listen 80;
listen [::]:80;
# For https
listen 443 ssl;
listen [::]:443 ssl;
ssl_certificate /etc/nginx/ssl/example.com.crt;
ssl_certificate_key /etc/nginx/ssl/example.com.key;
server_name ~^laravel(\.example\.com|\.localhost)?$;
root /var/www/laravel/public;
index index.php index.html index.htm;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
try_files $uri /index.php =404;
fastcgi_pass laravel-fpm:9000;
fastcgi_index index.php;
fastcgi_buffers 16 16k;
fastcgi_buffer_size 32k;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
#fixes timeouts
fastcgi_read_timeout 600;
fastcgi_socket_keepalive off;
include fastcgi_params;
}
location ~ /\.ht {
deny all;
}
location /.well-known/acme-challenge/ {
root /var/www/letsencrypt/;
# log_not_found off;
}
error_log /dev/stdout;
access_log /dev/stdout;
error_log /var/log/nginx/laravel_error.log;
access_log /var/log/nginx/laravel_access.log;
}