With apache it is relatively easy but I am finding lighttpd to be extremely frustrating. I have found several sites including the linode library that explain how to set a vhost/subdomain up, but for the life of me I cannot do it. Maybe it's an awkward thing to explain but I'm finding documentation on this subject around the web to be lacking in clarity. As a result I am finding setting up a vhost in lighttdp to be frustrating and convoluted, in my novice experience of course.
I haven't yet registered my domain name, so I am still accessing my site via my IP address until it is all sorted. http ://my_ip_addy takes me to where I want to go. My cms however is located out side my web root and I would like to set up a subdomain for it i.e http ://subdomain.my_ip_addy.
Could someone please explain to me how I might get such a thing to work.
Code:
$HTTP["host"] == "subdomain.my_ip_addy" {
server.document-root = "/path/to/subdomain/files"
}
The above doesn't work. I have also tried the Simple vHost setup located
here, to no avail. I find it very confusing. My linode setup has gone largely without a hitch surprisingly for me and this one thing that should be quite straight forward has as taken the majority of my time to sort out. Any help would be greatly appreciated as this is just driving me insane now.
Final note (just popped into my head). If I wanted to keep the url of my cms more secure or secret, could a vhost be setup to take me to a domain that is something other than that of my main website. So instead of:
Code:
w ww.myDomain.com - main site
http://cms.myDomain.com - cms access point
I could have:
Code:
w ww.myDomain.com - main site
http://cms.myOtherDomain.com - cms access point
Or should I just restrict access to the cms to my PCs IP address?