-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.conf
28 lines (26 loc) · 987 Bytes
/
default.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 {
# Listens on port 80 for incoming requests
listen 80;
# Sets the server name for the virtual host
server_name docker-app.test;
# Sets the document root directory for the virtual host
root /var/www/html;
# Sets the default index file for the virtual host
index index.php index.html;
# Sets the configuration for the base URL path
location / {
# Sets the fallback behavior for 404 errors
try_files $uri $uri/ /index.php?$query_string;
}
# Sets the configuration for requests ending in .php
location ~ \.php$ {
# Sends the request to the php-fpm service on port 9000
fastcgi_pass php:9000;
# Sets the default index file for PHP scripts
fastcgi_index index.php;
# Sets the script filename for PHP scripts
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
# Includes fastcgi parameters for the request
include fastcgi_params;
}
}