Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
 Post subject: Lighttpd Subhost issue
PostPosted: Fri Mar 12, 2010 12:23 am 
Offline
Newbie

Joined: Fri Mar 12, 2010 12:13 am
Posts: 4
I am setting up a site and would like subhosts for both phpmyadmin and my xcache admin.

I have tried several different methods with no success. The main domain site and www.domain work perfectly.

I'll call it example.co.uk

www.example.co.uk works fine and using my lighttpd config
example.co.uk also works as expected also using the config

I have the following A Name records set
database and xcache

I have tried:
Code:
$HTTP["host"] == "database.example.co.uk" {
    server.document-root = "/usr/share/phpmyadmin"
}
$HTTP["host"] == "xcache.example.co.uk" {
    server.document-root = "/usr/share/xcache/admin"
}


But this isn't working. Instead I am shown a server not found page.

Any help would be appreciated.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 6:24 am 
Offline
Newbie

Joined: Fri Mar 12, 2010 12:13 am
Posts: 4
Don't worry. The problem was just DNS propagation. I should learn to not be so inpatient.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 12:42 pm 
Offline
Senior Member
User avatar

Joined: Tue May 26, 2009 3:29 pm
Posts: 1691
Location: Montreal, QC
There is also the simplevhost module, which lets you define vhosts with directories; adding a new vhost is as simple as adding a directory. There are limitations, of course, the "simple" part means that it's really intended for people who don't need anything fancy.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 3:37 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
Surely, the code above isn't all there is to your configuration, is it? If you're inclined to expose your phpmyadmin and xcache admin interfaces to the whole world like that, keep in mind that you can say byebye to your database the moment you connect to one of those at your local Starbucks. At the very least, enable digest authentication; then put some self-signed SSL certificates in place.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 4:01 pm 
Offline
Newbie

Joined: Fri Mar 12, 2010 12:13 am
Posts: 4
It was only a quick fix. Not intended to remain up for long at all. I understand the security implications with it.

OFF TOPIC:

What suggestions would you have to securing such parts of a site? as it would be nice to have access to them quickly if needed in the future.

Oh and thank you for the replys.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 4:28 pm 
Offline
Senior Member

Joined: Fri May 02, 2008 8:44 pm
Posts: 1121
dacoxall wrote:
What suggestions would you have to securing such parts of a site?

Make them only accessible from localhost. When you need to access them, set up port forwarding through an SSH tunnel.

Code:
ssh -L 8080:127.0.0.1:80 username@hostname

If you're using PuTTY on Windows, the relevant settings are found in Connection -> SSH -> Tunnels.

Then you can browse to http://localhost:8080/phpmyadmin (or something like that) on your computer. The connection will be forwarded to http://localhost[:80]/phpmyadmin on the linode.


Top
   
 Post subject:
PostPosted: Fri Mar 12, 2010 4:45 pm 
Offline
Newbie

Joined: Fri Mar 12, 2010 12:13 am
Posts: 4
Thanks for the info. I'll have to look into that. :D


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group