This repository has been archived by the owner on Mar 10, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
default_nginx
54 lines (44 loc) · 1.53 KB
/
default_nginx
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
server {
listen 80;
root /var/www/wordpress;
index index.php index.html index.htm index.nginx-debian.html;
server_name hotspot.local;
client_max_body_size 50M;
#
# Redirect Sections
#
# Redirect requests for /generate_204 to open the captive portal screen
location /generate_204 {
return 302 http://hotspot.localnet;
}
# Redirect requests for /blank.html to open the captive portal screen
location /blank.html {
return 302 http://hotspot.localnet;
}
# Redirect requests for connectivitycheck.gstatic.com to open the captive portal screen
location connectivitycheck.gstatic.com {
return 302 http://hotspot.localnet;
}
# Redirect requests for /mobile/status.php to open the captive portal screen
location /mobile/status.php {
return 302 http://hotspot.localnet;
}
# For iOS to redirect requests for /hotspot-detect.html to open the captive portal screen
location /hotspot-detect.html {
return 302 http://hotspot.localnet;
}
# For iOS
if ($http_user_agent ~* (CaptiveNetworkSupport) ) {
return 302 http://hotspot.localnet;
}
location / {
try_files $uri $uri/ /index.php$is_args$args;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.3-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}