os: windows 10 PRO 64
flarum version: 1.5.0
software in windows : laragon 6
install flarum: https://docs.flarum.org/install
nginx: 10.22
php: 8.1.3
folder root: d:\laragon\www\
subfolder install: d:\laragon\www\flarum\
domain: http://localhost/
filedirectory: d:\Laragon\bin\nginx\nginx-1.xx.0\conf\nginx.conf
#generic nginx.conf for dev
#user nobody;
worker_processes 1;
#error_log logs/error.log;
#error_log logs/error.log notice;
#error_log logs/error.log info;
#pid logs/nginx.pid;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
#log_format main '$remote_addr - $remote_user [$time_local] "$request" '
# '$status $body_bytes_sent "$http_referer" '
# '"$http_user_agent" "$http_x_forwarded_for"';
#access_log logs/access.log main;
sendfile on;
#tcp_nopush on;
#keepalive_timeout 0;
keepalive_timeout 65;
#gzip on;
server_tokens off;
include "D:/Laragon/etc/nginx/php_upstream.conf";
#include "D:/Laragon/etc/nginx/sites-enabled/*.conf";
include "D:/Laragon/etc/nginx/sites-enabled/site.conf";
client_max_body_size 2000M;
server_names_hash_bucket_size 64;
}
filedirectory: D:\Laragon\etc\nginx\sites-enabled\site.conf
server {
listen 80;
#listen 8443 ssl;
#listen [::]:80;
root "D:/Laragon/www/flarum/public";
# RESTRICTMETHOD
if ($request_method !~ ^(GET|POST|HEAD)$) {
return '444';
}
# logging
#access_log logs/localhost.access.log main;
#error_log logs/localhost.error.log warn;
#INDEX
index index.php index.html index.htm ;
# additional config
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass php_upstream;
#fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
# additional config gzip
#include "D:/laragon/etc/nginx/sites-enabled/secureconf/general.conf";
#security
include "D:/laragon/etc/nginx/sites-enabled/secureconf/securitytest.conf";
#protect folder
include "D:/laragon/etc/nginx/sites-enabled/secureconf/protectfolder.conf";
include "D:/Laragon/www/flarum/.nginx.conf";
charset utf-8;
location ~ /\.ht {
allow all;
}
}
test site work perfectly in windows with this files
ps: i have install laragon6 with other folder , fresh nginx new install of flarum no problem... but method is valid if you have bug with laragon