forked from NamelessMC/Nameless
-
Notifications
You must be signed in to change notification settings - Fork 0
/
nginx-non-ssl.example
39 lines (31 loc) · 1.16 KB
/
nginx-non-ssl.example
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# Written by Latouth ([email protected]) for nginx on July 19th 2017
# Please note, this config MAY or MAY NOT work depending on php version, where you got php, where php is listening to (socket or port), etc
# In which case, please contact the NamelessMC Discord team for support.
server {
listen 80;
listen [::]:80;
# This depends on where you want to install nameless on file.
root /var/www/example.com/public;
index index.php;
server_name ~^(www.)?example.com;
# Logging
error_log /var/www/example.com/error.log warn;
access_log /var/www/example.com/access.log;
# Larger file upload size & larger script run times
client_max_body_size 128M;
client_body_timeout 300s;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/var/run/php-fpm/php-fpm.sock;
# This greatly depends on where php fpm is located
# It can be /var/run/php5/php-fpm.sock or 127.0.0.1:9000 or others.
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}
error_page 404 /404.php;
}