wordpress multi site cofiguration with nginx

Solutions on MaxInterview for wordpress multi site cofiguration with nginx by the best coders in the world

showing results for - "wordpress multi site cofiguration with nginx"
Silvia
13 Apr 2019
1
2location / {
3	try_files $uri $uri/ /index.php?$args;
4}
5
6location ~ ^/files/(.*)$ {
7  try_files /wp-content/blogs.dir/$blogid/$uri /wp-includes/ms-files.php?file=$1 ;
8  access_log off; log_not_found off; expires max;
9}
10
11location ~* \.(js|css|png|jpg|jpeg|gif|ico)$ {
12	expires 24h;
13	log_not_found off;
14}
15
16location ^~ /blogs.dir {
17	internal;
18	alias /var/www/pathtoyoursite/web/wp-content/blogs.dir ;
19	access_log off; log_not_found off;      expires max;
20}
21
22
23if (!-e $request_filename) {
24	rewrite /wp-admin$ $scheme://$host$uri/ permanent;
25	rewrite ^/[_0-9a-zA-Z-]+(/wp-.*) $1 last;
26	rewrite ^/[_0-9a-zA-Z-]+(/.*\.php)$ $1 last;
27}
28
Juline
29 Apr 2016
1map $http_host $blogid {
2    default 0;
3    include /var/www/pathtoyoursite/wp-content/uploads/nginx-helper/map.conf;
4}