Skip to content

Commit

Permalink
Tweak WordPress site type ask described in #1881
Browse files Browse the repository at this point in the history
  • Loading branch information
svpernova09 committed Aug 22, 2023
1 parent dfedb5e commit 98aa456
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
9 changes: 5 additions & 4 deletions scripts/homestead.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def self.configure(config, settings)
if settings.has_key?('paravirtprovider') && settings['paravirtprovider']
vb.customize ['modifyvm', :id, '--paravirtprovider', settings['paravirtprovider'] ||= 'kvm']
end

if Vagrant::Util::Platform.windows?
vb.customize ["setextradata", :id, "VBoxInternal2/SharedFoldersEnableSymlinksCreate/v-root", "1"]
end
Expand Down Expand Up @@ -107,7 +107,7 @@ def self.configure(config, settings)
v.memory = settings['memory'] ||= 2048
v.cpus = settings['cpus'] ||= 1
end

# Configure libvirt settings
config.vm.provider "libvirt" do |libvirt|
libvirt.default_prefix = ''
Expand Down Expand Up @@ -274,7 +274,7 @@ def self.configure(config, settings)
end
end
end

# Remove duplicate features to prevent trying to install it multiple times
settings['features'] = settings['features'].uniq{ |e| e.keys[0] }

Expand Down Expand Up @@ -415,7 +415,8 @@ def self.configure(config, settings)
site['xhgui'] ||= '', # $7
site['exec'] ||= 'false', # $8
headers ||= '', # $9
rewrites ||= '' # $10
rewrites ||= '', # $10
site['prod'] ||='' # $11
]

# Should we use the wildcard ssl?
Expand Down
9 changes: 9 additions & 0 deletions scripts/site-types/wordpress.sh
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,15 @@ block="server {
location = /favicon.ico { access_log off; log_not_found off; }
location = /robots.txt { allow all; access_log off; log_not_found off; }
location ~*/wp-content/uploads {
log_not_found off;
try_files \$uri @prod_site;
}
location @prod_site {
rewrite ^/(.*)$ https://${11}/$1 redirect;
}
location ~ /.*\.(jpg|jpeg|png|js|css)$ {
try_files \$uri =404;
}
Expand Down

0 comments on commit 98aa456

Please sign in to comment.