Open cerebralideas opened 11 years ago
+1 on this!
Same issue with the virtual hosts. I've tried using
reload: {
proxy: {
host: 'susydemo'
}
},
and my output in terminal is as follows:
Running "reload" task
Proxying http://susydemo:80/
reload server running at http://localhost:8001
Managed to get it working with the following:
// added server under grunt.initConfig
server: {
base: 'http://susydemo'
},
reload: {
proxy: {
port: 80,
host: 'susydemo' // is the name of my vhost
}
},
watch:{
files:['index.html', 'style.less'],
tasks:'default reload'
},
// etc...
Thanks @imjared for sharing your fix, but unfortunately, it didn't work for me. Here's my related grunt config:
server: {
base: 'http://phi.site'
},
reload: {
proxy: {
port: 80,
host: 'phi.site'
}
}
I'm still getting the following even after adding the server
configuration:
Running "reload" task
Proxying http://phi.site:80/
reload server running at http://localhost:8001
Did you happen to do more than just add the server
config? Thanks in advance for any help you may be able to offer :)
Is http://phi.site:80
accessible? If so, try hitting http://phi.site:8001
, make a change to index.html with grunt watch
running, and hopefully you'll see magic.
If that doesn't work for you, I'm afraid I won't be too much more help :disappointed:
Thanks for the reply @imjared, http://phi.site:80
works, but http://phi.site:8001
does not. I tried adding port: 80
to the grunt file like so:
server: {
base: 'http://phi.site'
},
reload: {
port: 80, // added this
proxy: {
port: 80,
host: 'phi.site'
}
}
But, that didn't help either. The problem is I'm not familiar with ports and such, so I'm not really sure what the different ports are supposed to reflect. Oh well, thanks for trying to help :)
I use MAMP with virtual hosts using port 80. I can't seem to figure out exactly how to configure the reload config. Here's how I want to write it:
This may be a stupid question, but can this also work with PHP sites that don't have a root index.html file?