2018-01-14 05:31:43 -05:00
|
|
|
worker_processes auto;
|
|
|
|
pid /tmp/nginx.pid;
|
|
|
|
daemon off;
|
|
|
|
|
|
|
|
events {
|
|
|
|
worker_connections 1024;
|
|
|
|
use epoll;
|
|
|
|
}
|
|
|
|
|
|
|
|
http {
|
|
|
|
|
|
|
|
include /etc/nginx/mime.types;
|
|
|
|
default_type application/octet-stream;
|
|
|
|
|
|
|
|
access_log off;
|
|
|
|
error_log /tmp/ngx_error.log error;
|
|
|
|
|
|
|
|
sendfile on;
|
|
|
|
keepalive_timeout 15;
|
|
|
|
keepalive_disable msie6;
|
|
|
|
keepalive_requests 100;
|
|
|
|
tcp_nopush on;
|
|
|
|
tcp_nodelay on;
|
|
|
|
server_tokens off;
|
|
|
|
|
|
|
|
fastcgi_temp_path /tmp/fastcgi 1 2;
|
|
|
|
client_body_temp_path /tmp/client_body 1 2;
|
|
|
|
proxy_temp_path /tmp/proxy 1 2;
|
|
|
|
uwsgi_temp_path /tmp/uwsgi 1 2;
|
|
|
|
scgi_temp_path /tmp/scgi 1 2;
|
|
|
|
|
|
|
|
server {
|
2020-02-09 13:55:56 -05:00
|
|
|
listen <FLARUM_PORT>;
|
2018-11-29 22:00:50 -05:00
|
|
|
charset utf-8;
|
2018-01-14 05:31:43 -05:00
|
|
|
|
2018-11-29 22:00:50 -05:00
|
|
|
root /flarum/app/public;
|
2018-01-14 05:31:43 -05:00
|
|
|
index index.php;
|
|
|
|
|
|
|
|
client_max_body_size <UPLOAD_MAX_SIZE>;
|
|
|
|
fastcgi_buffers 64 4K;
|
|
|
|
|
2020-02-17 14:56:35 -05:00
|
|
|
include /flarum/app/.nginx.conf;
|
2018-01-14 05:31:43 -05:00
|
|
|
|
|
|
|
# PHP Backend
|
|
|
|
# --------------------------------------
|
2021-03-16 14:42:22 -04:00
|
|
|
location ~* \.php$ {
|
2018-01-14 05:31:43 -05:00
|
|
|
try_files $uri =404;
|
2021-03-16 14:42:22 -04:00
|
|
|
include fastcgi_params;
|
2018-01-14 05:31:43 -05:00
|
|
|
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
|
|
|
fastcgi_index index.php;
|
2021-03-16 13:20:57 -04:00
|
|
|
fastcgi_pass unix:/run/php/php8-fpm.sock;
|
2018-01-14 05:31:43 -05:00
|
|
|
fastcgi_intercept_errors on;
|
|
|
|
fastcgi_request_buffering off;
|
2018-10-29 16:58:21 -04:00
|
|
|
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
|
|
|
fastcgi_param PATH_INFO $fastcgi_path_info;
|
|
|
|
fastcgi_param HTTP_PROXY "";
|
2018-01-14 05:31:43 -05:00
|
|
|
fastcgi_param REMOTE_ADDR $http_x_real_ip;
|
|
|
|
}
|
|
|
|
|
2021-02-04 19:35:29 -05:00
|
|
|
include /etc/nginx/flarum/custom-vhost-flarum.conf;
|
2018-01-14 05:31:43 -05:00
|
|
|
}
|
|
|
|
}
|