build: add production php and api runtime
This commit is contained in:
@@ -0,0 +1,50 @@
|
||||
server {
|
||||
listen 127.0.0.1:8000;
|
||||
server_name api.sbnews.net;
|
||||
|
||||
root /likeadmin_php/server/public;
|
||||
index index.php index.html;
|
||||
client_max_body_size 20M;
|
||||
|
||||
access_log /logs/sport-era-prod_access.log;
|
||||
error_log /logs/sport-era-prod_error.log;
|
||||
|
||||
set_real_ip_from 127.0.0.1;
|
||||
real_ip_header X-Forwarded-For;
|
||||
real_ip_recursive on;
|
||||
|
||||
location = /healthz {
|
||||
access_log off;
|
||||
default_type text/plain;
|
||||
return 200 "ok\n";
|
||||
}
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?s=$uri&$args;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
try_files $uri =404;
|
||||
include fastcgi_params;
|
||||
fastcgi_pass 127.0.0.1:9000;
|
||||
fastcgi_index index.php;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param HTTP_X_FORWARDED_PROTO $http_x_forwarded_proto;
|
||||
fastcgi_read_timeout 300s;
|
||||
}
|
||||
|
||||
location ~* \.(?:css|js|jpg|jpeg|gif|png|svg|ico|webp|woff2?)$ {
|
||||
expires 7d;
|
||||
add_header Cache-Control "public";
|
||||
try_files $uri =404;
|
||||
}
|
||||
|
||||
location ~ /\. {
|
||||
deny all;
|
||||
}
|
||||
|
||||
location = /favicon.ico {
|
||||
log_not_found off;
|
||||
access_log off;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
opcache.enable=1
|
||||
opcache.enable_cli=1
|
||||
opcache.memory_consumption=256
|
||||
opcache.interned_strings_buffer=32
|
||||
opcache.max_accelerated_files=30000
|
||||
opcache.validate_timestamps=1
|
||||
opcache.revalidate_freq=2
|
||||
opcache.save_comments=1
|
||||
@@ -0,0 +1,3 @@
|
||||
[www]
|
||||
listen = 127.0.0.1:9000
|
||||
listen.allowed_clients = 127.0.0.1
|
||||
Reference in New Issue
Block a user