Default subdomain configuration (.htaccess mabye?)

I’ve already created several accounts under my VPS, but have noticed that going straight to 2443 doesn’t work unless the ‘s’ is included in https://mydoman:2443

Ok… not a real problem, but I’d like to do something more obvious.

I’ve been looking into using .htaccess to dynamically redirect secure.mydomain.tld (sic) to https://mydomain.tld:2443

Going a step further, I’d like to be able to automatically map mail.mydomain.tld to the squirrelmail directory, but since the sm folder is already created, I have no idea how to properly set up the subdomain (meaning, I don’t want a simple redirect to the folder, I’d like sm to actually reside in the sub).

Is there anything in IW that would aid in such a thing? And while I’d love to have this in root, I suspect that a simple mod_rewrite would be problematic when placed above the hosted domains.

Alternatively, does anyone have any spiffy ideas about how to get there?

[quote=lightning;9549]I’ve already created several accounts under my VPS, but have noticed that going straight to 2443 doesn’t work unless the ‘s’ is included in https://mydoman:2443

Ok… not a real problem, but I’d like to do something more obvious. [/quote]

Requiting a secure connection to your control panel is prety standard.

I’ve been looking into using .htaccess to dynamically redirect secure.mydomain.tld (sic) to https://mydomain.tld:2443

This should be possible, just create the subdomain and the .htaccess file.

Going a step further, I’d like to be able to automatically map mail.mydomain.tld to the squirrelmail directory, but since the sm folder is already created, I have no idea how to properly set up the subdomain (meaning, I don’t want a simple redirect to the folder, I’d like sm to actually reside in the sub).

I’m not even sure if actually placing it inthe mail subdomain is possible. Anyone have any ideas?

.htaccess would work best here as well, I think unless you want to do some editing of files that could be overwritten later by an update. Alternately there are a few posts here on the forums on how to create/change these rewrites. You won’t be able to create a subdomain here unless you manually edit the DNS record on NodeWorx (removing the CNAME record for mail.mydomain.com).

I understand requiring a secure connection - what I meant to imply is that I would like to give lay users something easier to remember. On a previous host, I could just add the port number, and it would automatically redirect to the secure site. Sorry I wasn’t clear about that :slight_smile:

I’ll have some time tonight to play with .htaccess as a solution… I’ve found some instructional sites that have a number of resources. If I get it to work as expected, I’ll post the relevant information here.

One thing I’ve found to be difficult about IW is that not everything is revealed in a way that makes sense to me. For example, I can not find the squirrelmail install within the ScriptWorx, SiteWorx or NodeWorx interfaces, and in fact, the install doesn’t even show up under usr/ for hosted domains. That makes it difficult to update and customize.

On my previous shared plan, I rarely used cPanel, and instead did installs myself… in this case, it was simple to create a mail subdomain then install squirrelmail directly. But I had to do this for every account, and there was no way to cascade changes across all my resold accounts. Bummer :\

I don’t understand your final comment about removing the CNAME record for the mail sub… wouldn’t I still have to build the subdomain around the squirrelmail install, or at least provide some redirect and URL rewriting?

Oh - and thanks for the reply!

[quote=lightning;9553]

One thing I’ve found to be difficult about IW is that not everything is revealed in a way that makes sense to me. For example, I can not find the squirrelmail install within the ScriptWorx, SiteWorx or NodeWorx interfaces, and in fact, the install doesn’t even show up under usr/ for hosted domains. That makes it difficult to update and customize. [/quote]

Sorry for the confusion. if you ever have any questions all you have to do is ask.

Squirrelmail is NOT in the interface at all. The decision was made to provide Horde as the default webmail tool and it is the only one you can acess from the interface, but it is a global install which works for all domains on the box.

If you want to access Squirrelmail it is installed at mydomain.com/squirrelmail

I thought this was clear on the website and faq’s but maybe I’ll have to take a closer look :wink:

I don’t understand your final comment about removing the CNAME record for the mail sub… wouldn’t I still have to build the subdomain around the squirrelmail install, or at least provide some redirect and URL rewriting? [/qiote]

Sorry about that. I just checked what I was thinking and it turns out I was wrong :wink: Yes you’d need some sort of redirecting.

[quote]
Oh - and thanks for the reply!

np

If you want to access Squirrelmail it is installed at mydomain.com/squirrelmail

I thought this was clear on the website and faq’s but maybe I’ll have to take a closer look :wink:

Yup! It’s there, I just thought I might be missing something - my (mis)understanding was that the domain/sm folder was a result of doing something in the IW gui. But, if Horde is the preferred option, I’ll have to take a look. I have spent the last few years w/ SM and am comfortable branding it, and adding configuration options. The company I work for also uses SM as an alternative to using VPN while travelling.

Anyhoo!

I presume it’s possible then to install Horde in a mail.domain.tld kind of setup without using a redirect. If so, I have to go read up on Horde so I can brand it… any chance you might happen to know if this is something that can also be done as a standard setup when creating new domains under my VPS?

If you really want squirrelmail from the interface you can create a custom theme and change the link in the template HOWEVER you would need to manually update the theme with every significant release as new screens are added and sometimes moved around in the interface.

I don’t believe we can customize default account to that degree but you are free to take a look.

The default virtual host config file is

/home/interworx/etc/vhost-base.conf

The default contents of your account’s html directory are

/home/interworx/etc/skel

Some thoights:

You’d need to create a database and user in one account and have all domains use the same db and user AND figure out a way to get each individual instance’s config file have the correct path to the software, and you need to be aware that everyting in the virtualhost’s directory counts tward the quota and you’d need to manually create the subdomain. Creating the directory is easy, making it a subdomain is harder.

Perhaps you could use symlinks to a comon directory rather than redirects. You’d need to figure out a way to get this to work permission wise.

Anyway play around with it and let us know how it works for you :slight_smile: