Skip to content
This repository was archived by the owner on Jun 5, 2025. It is now read-only.

Commit 98aa456

Browse files
committed
Tweak WordPress site type ask described in #1881
1 parent dfedb5e commit 98aa456

File tree

2 files changed

+14
-4
lines changed

2 files changed

+14
-4
lines changed

scripts/homestead.rb

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def self.configure(config, settings)
5555
if settings.has_key?('paravirtprovider') && settings['paravirtprovider']
5656
vb.customize ['modifyvm', :id, '--paravirtprovider', settings['paravirtprovider'] ||= 'kvm']
5757
end
58-
58+
5959
if Vagrant::Util::Platform.windows?
6060
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
6161
end
@@ -107,7 +107,7 @@ def self.configure(config, settings)
107107
v.memory = settings['memory'] ||= 2048
108108
v.cpus = settings['cpus'] ||= 1
109109
end
110-
110+
111111
# Configure libvirt settings
112112
config.vm.provider "libvirt" do |libvirt|
113113
libvirt.default_prefix = ''
@@ -274,7 +274,7 @@ def self.configure(config, settings)
274274
end
275275
end
276276
end
277-
277+
278278
# Remove duplicate features to prevent trying to install it multiple times
279279
settings['features'] = settings['features'].uniq{ |e| e.keys[0] }
280280

@@ -415,7 +415,8 @@ def self.configure(config, settings)
415415
site['xhgui'] ||= '', # $7
416416
site['exec'] ||= 'false', # $8
417417
headers ||= '', # $9
418-
rewrites ||= '' # $10
418+
rewrites ||= '', # $10
419+
site['prod'] ||='' # $11
419420
]
420421

421422
# Should we use the wildcard ssl?

scripts/site-types/wordpress.sh

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,15 @@ block="server {
5353
location = /favicon.ico { access_log off; log_not_found off; }
5454
location = /robots.txt { allow all; access_log off; log_not_found off; }
5555
56+
location ~*/wp-content/uploads {
57+
log_not_found off;
58+
try_files \$uri @prod_site;
59+
}
60+
61+
location @prod_site {
62+
rewrite ^/(.*)$ https://${11}/$1 redirect;
63+
}
64+
5665
location ~ /.*\.(jpg|jpeg|png|js|css)$ {
5766
try_files \$uri =404;
5867
}

0 commit comments

Comments
 (0)