Commit 209c0493 authored by Dave Lane's avatar Dave Lane
Browse files

working configuration, but no caching configured

parent 50c79a96
......@@ -14,58 +14,42 @@ map $blogname $blogid{
# statements for each of your virtual hosts to this file
server {
listen 80;
# server_name testwpms.local;
root /var/www/html;
index index.php index.html index.htm;
# from https://www.nginx.com/resources/wiki/start/topics/recipes/wordpress/
location = /favicon.ico {
log_not_found off;
access_log off;
}
location = /favicon.ico { log_not_found off; access_log off; }
location = /robots.txt {
allow all;
log_not_found off;
access_log off;
}
location = /robots.txt { allow all; log_not_found off; access_log off; }
location ~ ^(/[^/]+/)?files/(.+) {
try_files /wp-content/blogs.dir/$blogid/files/$2 /wp-includes/ms-files.php?file=$2 ;
access_log off;
log_not_found off;
expires max;
access_log off; log_not_found off; expires max;
}
#avoid php readfile()
location ^~ /blogs.dir {
internal;
alias /var/www/html/wp-content/blogs.dir;
access_log off;
log_not_found off;
expires max;
access_log off; log_not_found off; expires max;
}
# if (!-e $request_filename) {
# rewrite /wp-admin$ $scheme://$host$uri/ permanent;
# rewrite ^(/[^/]+)?(/wp-.*) $2 last;
# rewrite ^(/[^/]+)?(/.*\.php) $2 last;
# }
if (!-e $request_filename) {
rewrite /wp-admin$ $scheme://$host$uri/ permanent;
rewrite ^(/[^/]+)?(/wp-.*) $2 last;
rewrite ^(/[^/]+)?(/.*\.php) $2 last;
}
# from https://www.digitalocean.com/community/tutorials/how-to-install-wordpress-with-nginx-on-ubuntu-14-04
# with other bits from https://premium.wpmudev.org/blog/wordpress-multisite-wordpress-nginx/
location / {
# try_files $uri $uri/ =404;
#try_files $uri $uri/ /index.php?q=$uri&$args;
try_files $uri $uri/ /index.php?$args;
}
error_page 404 /404.html;
# Directives to send expires headers and turn off 404 error logging.
location ~* ^.+\.(xml|ogg|ogv|svg|svgz|eot|otf|woff|mp4|ttf|css|rss|atom|js|jpg|jpeg|gif|png|ico|zip|tgz|gz|rar|bz2|doc|xls|exe|ppt|tar|mid|midi|wav|bmp|rtf)$ {
access_log off;
log_not_found off;
expires max;
access_log off; log_not_found off; expires max;
}
location ~ \.php$ {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment