Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Sun May 20, 2012 6:30 pm 
Offline
Senior Member

Joined: Thu Apr 12, 2012 6:26 am
Posts: 62
Location: Earth
Hi all,

I have the LAMP stack setup on CentOS 6.2 with virtual domains.
On local disk, my virtual domains are here:
/var/www/vhosts/domain1
/var/www/vhosts/domain2
/var/www/vhosts/domain3
and Apache’s default location for web files is : /var/www/html.

I have roundcube installed at this default location and it maps to http://www.myserver.com/webmail/roundcube
Question #1: How can I map this installation to the virtual domains such that for the virtual domains, users would be able to access roundcube by going to: www.domain1.com/webmail/roundcube
and still get to the same roundcube installation I installed centrally?

#2:
How can I do the same for PostfixAdmin which is at myserver.com/postfixadmin?

Thanks in advance for you help and suggestions.


Top
   
 Post subject:
PostPosted: Sun May 20, 2012 11:13 pm 
Offline
Senior Member
User avatar

Joined: Thu Nov 24, 2011 12:46 pm
Posts: 139
Location: Mesa AZ
Not sure if you need a separate configuration file for each host, but if not, you could install the app in your vhost area like:

Code:
/var/www/vhosts/rc


Then for each virtual host you want to have access to it, add an Alias to the virtual host entry for them like using perhaps a non-standard name for it (prevent bot scans looking for the app)...

Code:
   Alias /MyWebMail  "/var/www/vhosts/rc"


Then your virtual hosts would be able to get to it with a link like:

Code:
  http://myclient.domain.tld/MyWebMail


I do the same thing with my phpMyAdmin by using an alias name that has nothing to do with the app, so far off the wall, I forget sometimes what it is. It is also behind a rule set to prevent access except via specific known IP's though as well.

Not sure about PostfixAdmin as I have never seen it.


To your comment about your default Apache location... I make even the default page a virtual host. I call it junk. It has a page which displays a you got to the wrong place page along with some basic info as to what link they tried. This allows me to catch the crap hits that try connection via IP only, and also provides a nice looking page when a virtual host has been taken offline (many times a project site) or is not yet configured.

I just make the first entry in the virtual hosts conf file like:

Code:
<VirtualHost *:80>
    ServerAdmin     "webmaster at domain.tld"
    DocumentRoot    /www/vhosts/junk
    ErrorLog        logs/junk.errors
    CustomLog       logs/junk.combined combined
</VirtualHost>

_________________
Kevin a.k.a. Dweeber


Top
   
 Post subject:
PostPosted: Tue May 22, 2012 12:04 am 
Offline
Senior Member

Joined: Thu Apr 12, 2012 6:26 am
Posts: 62
Location: Earth
Thanks a lot @Dweeber, its working now.


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


Who is online

Users browsing this forum: No registered users and 1 guest


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