mirror of
https://github.com/docker/awesome-compose.git
synced 2025-04-26 02:38:07 +02:00
Sample for nginx-php-mysql
Signed-off-by: Joseph Barreca <jbarrec.tech@gmail.com>
This commit is contained in:
parent
a42a8531ab
commit
98b90b1d49
7 changed files with 141 additions and 0 deletions
2
nginx-php-mysql/proxy/Dockerfile
Executable file
2
nginx-php-mysql/proxy/Dockerfile
Executable file
|
@ -0,0 +1,2 @@
|
|||
FROM nginx:1.19.8-alpine
|
||||
COPY conf /etc/nginx/conf.d/default.conf
|
32
nginx-php-mysql/proxy/conf
Executable file
32
nginx-php-mysql/proxy/conf
Executable file
|
@ -0,0 +1,32 @@
|
|||
server {
|
||||
location ~ /.well-known {
|
||||
allow all;
|
||||
}
|
||||
|
||||
location ~ /\.ht {
|
||||
deny all;
|
||||
}
|
||||
|
||||
root /var/www/html;
|
||||
|
||||
index index.php index.html;
|
||||
|
||||
location / {
|
||||
try_files $uri $uri/ /index.php?$args;
|
||||
}
|
||||
|
||||
location ~ [^/]\.php(/|$) {
|
||||
fastcgi_split_path_info ^(.+?\.php)(/.*)$;
|
||||
if (!-f $document_root$fastcgi_script_name) {
|
||||
return 404;
|
||||
}
|
||||
|
||||
include fastcgi_params;
|
||||
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
|
||||
fastcgi_param PATH_INFO $fastcgi_path_info;
|
||||
fastcgi_param PATH_TRANSLATED $document_root$fastcgi_path_info;
|
||||
|
||||
fastcgi_pass backend:9000;
|
||||
fastcgi_index index.php;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue