Global Apache Alias using SuExec and mod_fcgid

4 posts / 0 new
Last post
#1 Thu, 07/12/2007 - 04:48
RyanJohnson

Global Apache Alias using SuExec and mod_fcgid

Hey,

Does anyone have tips on creating a server-wide alias "/webmail" that maps to say /usr/share/roundcubemail that uses the mod_fcgid wrapper and run as each domain users?

I'm getting suexec errors and am interested to hear if anyone has tried doing this.

Cheers, Ryan

Thu, 07/12/2007 - 06:19
Joe
Joe's picture

Hey Ryan,

You're mixing up how suexec is willing to work. If you want it to run as each individual domain owner user, you'll need it to be installed for each domain. No way to avoid that--the file has to be owned by the domain owner account.

But a shared instance should be fine. It's just a mail client, and reads data via IMAP, and everything is on the same server. There is the problem of virtual name mapping (which Usermin can handle correctly with the right configuration, but the others have a hard time with because they don't have access to the Postfix virtual map).

--

Check out the forum guidelines!

Thu, 07/12/2007 - 07:07 (Reply to #2)
RyanJohnson

Hey Joe

Well there's two things that I have tried :

1st : Location /
created a wwwroot user
copied the mail client into /home/wwwroot/public_html/roundcubemail
add a /webmail alias globally to /home/wwwroot/public_html/roundcubemail

then in each virtual server I added one of these:

<Location "/">
Options -Indexes IncludesNOEXEC FollowSymLinks ExecCGI
allow from all
AddHandler fcgid-script .php
FCGIWrapper /home/usersaccountname/fcgi-bin/php5.fcgi .php
</Location>

Seemed to work.. any problem with doing it this way?

It would be good if apache could dynamically work out the users home dir.

2nd thing I tried was:

ProxyPass /webmail http://myserver.com/roundcubemail
ProxyPassReverse /webmail http://myserver.com/roundcubemail

Bit yucky this

What are your thought's on these options?

Cheers,
Ryan

Thu, 07/12/2007 - 12:20
mike

ok, i have a little thought here, i have done something similar except with a sub-domain, but i looked around my "sites-available" folder on my machine and came across something that might help, i have modified it slightly from its original form so that it fits into your particular instance, now this thought is for a "global" directory that is "non-existent" meaning that you don't need to have multiple installs of the software and you don't need to worry about getting emails from clients saying their web-mail is broken or missing files or that they accidentaly deleted a file in it or it all together. the code can be done multiple ways. the first is in full and to be appended to the "default" site the second can be setup as an optional "alias" that you can either append to the template or have it as "available upon request"

[code:1]Alias /webmail /usr/share/roundcubemail
<Directory /usr/share/roundcubemail>
AllowOverride AuthConfig Limit
Options MultiViews IncludesNoExec FollowSymLinks
DirectoryIndex index.html index.php
</Directory>[/code:1]

[code:1]Alias /webmail /usr/share/roundcubemail[/code:1]

both of those should work to perform the same task, the downfall of using any of these 2 ways is that any mail user on the server can log into their account via any domain on the server. for this reason i suggest to the append the alias line to the root domain apache site of the server.

Topic locked