-
Notifications
You must be signed in to change notification settings - Fork 14
/
joomla.conf
42 lines (34 loc) · 1.07 KB
/
joomla.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
server {
server_name example.com www.example.com;
listen 80;
listen 443;
# canonical domain
include /srv/example.com/nginx/conf/canonical_domain.conf;
# document root
root /srv/example.com/nginx/www;
index index.php index.html index.htm;
# joomla admin (http auth)
location ~ ^/administrator/ {
include /srv/example.com/nginx/conf/http_auth_basic.conf;
if (!-f $document_root$fastcgi_script_name) {
rewrite ^ 404;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# default PHP handler
location ~ \.php$ {
if (!-f $document_root$fastcgi_script_name) {
rewrite ^ 404;
}
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
# logging
access_log /srv/example.com/nginx/log/access.log;
error_log /srv/example.com/nginx/log/error.log;
}