- Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault-nginx.conf
28 lines (23 loc) · 781 Bytes
/
default-nginx.conf
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
server {
listen 80;
server_name localhost;
root /var/www/html/public;
index index.php index.html index.htm;
access_log /var/log/nginx/host.access.log;
error_log /var/log/nginx/host.error.log;
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
# pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
location ~ \.php$ {
#fastcgi_pass unix:/run/php/php8.2-fpm.sock;
fastcgi_pass 127.0.0.1:9000;
fastcgi_index /index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# deny access to .htaccess files
location ~ /\.ht {
deny all;
}
}