forked from novafacing/mellivora
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmellivora.nginx.conf
43 lines (34 loc) · 1.19 KB
/
mellivora.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
server {
listen 80;
listen [::]:80;
listen 443 ssl;
# ========================================================
# =========== Modify from here ===========================
# ========================================================
root /var/www/mellivora/htdocs;
server_name ctf.yourdomain.com;
index index.html index.htm index.php;
access_log /var/log/nginx/ctf.yourdomain.com_access.log;
error_log /var/log/nginx/ctf.yourdomain.com_error.log;
ssl on;
ssl_certificate /etc/nginx/ssl/ctf.yourdomain.com.crt;
ssl_certificate_key /etc/nginx/ssl/ctf.yourdomain.com.key;
# ========================================================
# =========== End of modify ==============================
# ========================================================
location / {
try_files $uri $uri/ @extensionless-php;
}
location @extensionless-php {
rewrite ^(.*)$ $1.php last;
}
location ~ \.php(?:$|/) {
include /etc/nginx/fastcgi_params;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param HTTPS on;
fastcgi_pass unix:/var/run/php5-fpm.sock;
}
}