43 lines
1.1 KiB
Nginx Configuration File
43 lines
1.1 KiB
Nginx Configuration File
user nginx;
|
|
worker_processes auto;
|
|
error_log /dev/stderr warn;
|
|
pid /var/run/nginx.pid;
|
|
|
|
events { worker_connections 1024; }
|
|
|
|
http {
|
|
include /etc/nginx/mime.types;
|
|
default_type application/octet-stream;
|
|
access_log /dev/stdout main;
|
|
sendfile on;
|
|
keepalive_timeout 65;
|
|
server_tokens off;
|
|
|
|
server {
|
|
listen 8080 default_server;
|
|
listen [::]:8080 default_server;
|
|
root /var/www/public;
|
|
index index.php index.html;
|
|
|
|
location /healthz { return 200 'ok'; add_header Content-Type text/plain; }
|
|
|
|
location / {
|
|
try_files $uri $uri/ /index.php?$query_string;
|
|
}
|
|
|
|
location ~ \.php$ {
|
|
include fastcgi_params;
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
fastcgi_pass 127.0.0.1:9000; # php-fpm
|
|
fastcgi_index index.php;
|
|
fastcgi_buffers 16 16k;
|
|
fastcgi_buffer_size 32k;
|
|
}
|
|
|
|
location ~* \.(js|css|png|jpg|jpeg|gif|ico|svg)$ {
|
|
expires 30d;
|
|
access_log off;
|
|
}
|
|
}
|
|
}
|