-
Notifications
You must be signed in to change notification settings - Fork 64
/
cloud.conf
33 lines (28 loc) · 1.06 KB
/
cloud.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
29
30
31
32
33
server{
# Docker 内部的地址,无关紧要
listen 8080;
server_name _;
root /var/www/html;
index index.php index.html /_h5ai/public/index.php;
# _h5ai/private 文件夹下的内容是不可直接访问的,设置屏蔽
location ~ _h5ai/private {
deny all;
}
# 根目录是私有目录,使用 basic auth 进行认证,只有我(超极致的小 C)自己可以访问
location / {
auth_basic "easy h5ai. For visitors, please refer to public directory at `/Public!`";
auth_basic_user_file /etc/nginx/conf.d/htpasswd;
}
# Public 目录是公开的,任何人都可以访问,便于我给大家分享文件
location /Public {
allow all;
index /Public/_h5ai/public/index.php;
}
# PHP 的 fastcgi 配置,将请求转发给 php-fpm
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}