mirror of
https://github.com/YGGverse/YGGtracker.git
synced 2026-03-31 17:15:38 +00:00
Updated Nginx (markdown)
parent
3af4de11fb
commit
4ef1b7b758
1 changed files with 63 additions and 3 deletions
66
Nginx.md
66
Nginx.md
|
|
@ -4,6 +4,67 @@ Follow official Symfony docs
|
|||
|
||||
https://symfony.com/doc/current/setup/web_server_configuration.html
|
||||
|
||||
## Domain location
|
||||
|
||||
URL example:
|
||||
|
||||
`http://tracker.ygg`
|
||||
|
||||
App sources:
|
||||
|
||||
`/var/www/YGGverse/YGGtracker`
|
||||
|
||||
Web root:
|
||||
|
||||
`/var/www/html`
|
||||
|
||||
Symlink:
|
||||
|
||||
`ln -s /var/www/YGGverse/YGGtracker/public /var/www/html/yggtracker`
|
||||
|
||||
Config:
|
||||
|
||||
```
|
||||
server {
|
||||
|
||||
listen [::]:80;
|
||||
|
||||
allow 0200::/7;
|
||||
deny all;
|
||||
|
||||
root /var/www/YGGverse/YGGtracker/public;
|
||||
|
||||
index index.html index.htm index.nginx-debian.html index.php;
|
||||
|
||||
server_name tracker.ygg;
|
||||
|
||||
location / {
|
||||
|
||||
try_files $uri /index.php$is_args$args;
|
||||
}
|
||||
|
||||
location ~ ^/index\.php(/|$) {
|
||||
|
||||
fastcgi_param APP_ENV prod;
|
||||
|
||||
include snippets/fastcgi-php.conf;
|
||||
|
||||
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
||||
|
||||
fastcgi_split_path_info ^(.+\.php)(/.*)$;
|
||||
|
||||
fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
|
||||
fastcgi_param DOCUMENT_ROOT $realpath_root;
|
||||
|
||||
internal;
|
||||
}
|
||||
|
||||
location ~ \.php$ {
|
||||
return 404;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
||||
## Sub-directory location
|
||||
|
||||
URL example:
|
||||
|
|
@ -31,8 +92,8 @@ server {
|
|||
listen [::]:80 default;
|
||||
|
||||
# Yggdrasil-only connections
|
||||
# allow 0200::/7;
|
||||
# deny all;
|
||||
allow 0200::/7;
|
||||
deny all;
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
|
|
@ -52,7 +113,6 @@ server {
|
|||
|
||||
location @yggtracker {
|
||||
|
||||
# Provide actual php -v
|
||||
fastcgi_pass unix:/run/php/php8.1-fpm.sock;
|
||||
|
||||
include fastcgi_params;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue