mirror of
https://github.com/YGGverse/HLState.git
synced 2026-03-31 09:05:44 +00:00
add nginx example
This commit is contained in:
parent
2ab0da4fa8
commit
87ffaa00ae
1 changed files with 39 additions and 0 deletions
39
README.md
39
README.md
|
|
@ -33,6 +33,45 @@ Project initially written to explore [Yggdrasil](https://github.com/yggdrasil-ne
|
|||
* `cp .env .env.local`
|
||||
* `crontab -e` > `* * * * * /usr/bin/curl --silent http://localhost/crontab/index &> /dev/null`
|
||||
|
||||
#### Nginx
|
||||
|
||||
```
|
||||
map $request_uri $loggable {
|
||||
~^/crontab/index 0;
|
||||
default 1;
|
||||
}
|
||||
|
||||
server {
|
||||
listen [::]:27080;
|
||||
|
||||
server_name hl.ygg ygg.hl.srv;
|
||||
|
||||
access_log /var/log/nginx/hl.access.log combined if=$loggable;
|
||||
error_log /var/log/nginx/hl.error.log warn;
|
||||
|
||||
root /var/www/hlstate/HLState/public;
|
||||
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
location ~ ^/index\.php(/|$) {
|
||||
fastcgi_pass unix:/run/php/php8.4-fpm.sock;
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
include fastcgi_params;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
|
||||
internal;
|
||||
}
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
### Update
|
||||
|
||||
* `git pull`
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue