homestead icon indicating copy to clipboard operation
homestead copied to clipboard

Enhancement Suggestion:

Open vsmash opened this issue 2 years ago • 0 comments

Please note that the Homestead issue tracker is reserved for bug reports and enhancements. We are not always able to debug Vagrant, Provider or Operating System issues, but will do our best to help. Thank you!

Versions

2.2.19

Suggestion

homestead.rb line 376, add a variable for production url:

          s.args = [
              site['map'],                # $1
              site['to'],                 # $2
              site['port'] ||= http_port, # $3
              site['ssl'] ||= https_port, # $4
              site['php'] ||= '8.1',      # $5
              params ||= '',              # $6
              site['xhgui'] ||= '',       # $7
              site['exec'] ||= 'false',   # $8
              headers ||= '',             # $9
              rewrites ||= '',            # $10
              site['prod'] ||=''          # $11
          ]

..so that we can specify nginx redirect for missing assets. eg: for wp-content/uploads in site-types/wordpress.sh

    location ~*/wp-content/uploads {
        log_not_found off;
        try_files \$uri @prod_site;
    }

    location @prod_site {
        rewrite ^/(.*)$ https://${11}/\$1 redirect;
    }

vsmash avatar Aug 12 '22 07:08 vsmash