soyturk / minify

Automatically exported from code.google.com/p/minify
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

doc root, subdomain issue #188

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Minify version: 2.1.3
PHP version: 5.2.3

Hi I've got minify in a subdomain called apps http://apps.mysite.com/min/

The files it's serving are also in the apps subdomain 
http://apps.mysite.com/script/file1.js, http://apps.mysite.com/script/file2.js, 
http://apps.mysite.com/script/file3.js

My site is in the root directory http://mysite.com/ and I want use minify on 
the javascript files.

I don't understand however what config and groupconfig settings I should be 
using to get this to work.

I keep receiving HTTP/1.0 400 Bad Request. What settings need changing from the 
default to get this to work?

Thanks

Original issue reported on code.google.com by colin.me...@googlemail.com on 29 Jul 2010 at 9:22

GoogleCodeExporter commented 9 years ago
just to clarify the directory for the subdomain is: 
/var/www/vhosts/mysite.com/subdomains/apps/httpdocs/

And for my site:
/var/www/vhosts/mysite.com/httpdocs/

I'm adding the following script to my index file:
http://apps.mysite.com/min/g=js

And in my groups config I have:
'js' => array('http://apps.mysite.com/script/file1.js', 
'http://apps.mysite.com/script/file2.js', 
'http://apps.mysite.com/script/file3.js')

Thanks

Original comment by colin.me...@googlemail.com on 29 Jul 2010 at 10:00

GoogleCodeExporter commented 9 years ago
I'll reply on the support list:
http://groups.google.com/group/minify

Original comment by mrclay....@gmail.com on 29 Jul 2010 at 2:17

GoogleCodeExporter commented 9 years ago
I'll spare the list in this case. the values in groupsConfig.php must be file 
paths, not URLs. You can use full paths like: 
'/var/www/vhosts/mysite.com/httpdocs/js/myFile.js' or use // to substitute the 
current docroot: '//js/myFile.js'

It's easiest to use Minify when the files are in the same docroot as Minify is 
running. You should be able to do:
http://apps.mysite.com/min/b=script&f=file1.js,file2.js

or in groupsConfig.php:

return array(
  'js' => '//script/file1.js',
  // etc.
);

Original comment by mrclay....@gmail.com on 29 Jul 2010 at 2:25

GoogleCodeExporter commented 9 years ago
Perfect! Thankyou.

Original comment by colin.me...@googlemail.com on 29 Jul 2010 at 3:31