Koozali.org: home of the SME Server

Legacy Forums => General Discussion (Legacy) => Topic started by: Ole J on May 14, 2003, 09:20:20 PM

Title: webmail.mydomain.com
Post by: Ole J on May 14, 2003, 09:20:20 PM
How do I get "webmail.mydomain.com" to point to webmail on my e-smith 5.6 server?
The httpd.conf says I have to edit the httpd.conf in "templates" directory, but all I find there (/etc/e-smith/templates/etc/httpd/conf/httpd.conf/VirtualHosts/) is some text-files with scripting in them, plus template -begin and -end files.
What do I edit and how?
Title: Re: webmail.mydomain.com
Post by: Ole J on May 14, 2003, 09:36:16 PM
In general I would very much like to know how to administer subdomains.

Thank you.
Title: Re: webmail.mydomain.com
Post by: Jim Gooch on May 14, 2003, 10:54:39 PM
First you need a DNS entry for webmail.mydomain.com which points to the relevant IP.

If you have set up a virtual server "webmail.mydomain.com" & are using your SME as an internal DNS server then the job is half done for you. For external access you will need to ask whoever is hosting your domain's DNS to do it for you.

Second if you wish the URL to be http://webmail.mydomain.com rather than http://webamil.mydomain.com/webmail you need to map the virtual server to the relevant directory - not sure whether you can do this in the web service manager or not but you can definitely hack the config file
Title: Re: webmail.mydomain.com
Post by: Jim Gooch on May 14, 2003, 11:14:01 PM
As an alternative to hacking the config file - whichever one it is - you could map the virtual server to an ibay and have an index.html page as the only content of that ibay which re-directs to .../webmail/

Alternatively you could use an index.html page that contains a hidden frameset like this but of course this only works with a frame enabled broswer - does have the benefit of keeping "http://webmail.yourdomain.com" as the url in most browsers



<-Whatever content you want->

border="0">
        src="https://webmail.yourdomain.com/webmail/"
    name="MAIN" scrolling="AUTO" noresize frameborder="0"
    border="0" marginheight="3" marginwidth="3">
    <br />&nbsp; &nbsp; <body><br />&nbsp; &nbsp; </body><br />&nbsp; &nbsp;
Title: Re: webmail.mydomain.com
Post by: Ole J on May 14, 2003, 11:14:47 PM
The DNS-part is already in place since I control my external DNS and I have set up *.mydomain.com. Then

My question must the be; what config file do I have to edit to map a Virtual Server to a certain directory? And is it posible at all?

Thank you for your help.
Title: Re: webmail.mydomain.com
Post by: Ole J on May 14, 2003, 11:17:38 PM
I already thought about the redirect part, thanks :-)
Unfortunately that isn't the solution I've been looking for since it does not give me "true" subdomains.

Good idea, anyways :-)
Title: Re: webmail.mydomain.com
Post by: Jim Gooch on May 21, 2003, 12:04:27 AM
Gave the following a try and it works fine.
Point webmail.yourdomain.com at a given ibay
Log on to console as root
Navigate to the ibay
Delete html directory
Create a new symbolic directory link "html" in the ibay to /home/httpd/html/horde/imp/
Job done

Then when you create webmail.yourother.domain.com just point it at the same ibay etc
Title: Re: webmail.mydomain.com
Post by: Ole J on May 21, 2003, 06:11:33 AM
Here is what I get trying to access the page when I use a symbolic link:
-----------------
Forbidden
You don't have permission to access / on this server
----------------

Thanks anyways.

Any other suggestions would be highly appreciated. Especially I would like to know how to "permanently" add my own Virtual Domains to httpd.conf using the templates-custom.
Title: Re: webmail.mydomain.com
Post by: Ole J on May 24, 2003, 12:58:30 AM
I found out how to do it:
In the folder "/etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/"
I created a file called "80MyVirtualHosts"
(80 defines where in the httpd.conf the contents will be placed.)

I pico'ed the file:
# pico /etc/e-smith/templates-custom/etc/httpd/conf/httpd.conf/80MyVirtualHosts

And after entered the following and saved, I restarted the server:
#---------------------------START OF FILE------------------------------------

#---------------------------------------
# This file contains my virtualhosts
#---------------------------------------

    ServerName www.webmail.MYDOMAIN.TLD
    ServerAlias webmail.MYDOMAIN.TLD

    # primary content

    DocumentRoot         /home/httpd/html/horde/imp/SSLonly

    # skipping SSL directives

    # skipping ProxyPass directives

    # webmail aliases

    Alias       /webmail /home/httpd/html/horde/imp/SSLonly
    Alias       /horde /home/httpd/html/horde

   
    RequireSSL on
   


    # alias for Apache icons

    Alias /icons/ /var/www/icons/


# Alias for server resources

Alias /server-resources/ /home/e-smith/files/server-resources/





    ServerName www.webmail.MYDOMAIN.TLD
    ServerAlias webmail.MYDOMAIN.TLD

    # primary content

    DocumentRoot         /home/httpd/html/horde

    # SSL Directives

    SSLEngine on
    SSLCertificateFile /home/e-smith/ssl.crt/secure.MYDOMAIN.TLD.crt
    SSLCertificateKeyFile /home/e-smith/ssl.key/secure.MYDOMAIN.TLD.key
    SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown downgrade-1$



    # ProxyPass executes a module which relays requests to another server
    # We use it to allow transparent access to the admin instance of the
    # web server.

    ProxyPass /server-brand http://127.0.0.1:980/server-brand/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    ProxyPass /e-smith-brand http://127.0.0.1:980/e-smith-brand/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    # ProxyPass executes a module which relays requests to another server
    # We use it to allow transparent access to the admin instance of the
    # web server.

    ProxyPass /e-smith-common http://127.0.0.1:980/server-common/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    ProxyPass /server-common http://127.0.0.1:980/server-common/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    # ProxyPass executes a module which relays requests to another server
    # We use it to allow transparent access to the admin instance of the
    # web server.

    ProxyPass /e-smith-manager http://127.0.0.1:980/e-smith-manager/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    ProxyPass /server-manager http://127.0.0.1:980/server-manager/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    # ProxyPass executes a module which relays requests to another server
    # We use it to allow transparent access to the admin instance of the
    # web server.

    ProxyPass /e-smith-password http://127.0.0.1:980/user-password/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    ProxyPass /user-password http://127.0.0.1:980/user-password/
   
        order deny,allow
        deny from all
        allow from 127.0.0.1 172.16.36.0/255.255.252.0
   


    Alias       /webmail /home/httpd/html/horde/imp
    Alias       /horde /home/httpd/html/horde
    Alias /icons/ /var/www/icons/



#---------------------------END OF FILE------------------------------------
Title: Re: webmail.mydomain.com
Post by: dean on May 29, 2003, 09:09:15 AM
I have two sme's 5.6. On my linksys router i forward the 80, 110 and 25 ports to one sme. On that server i have several domains but is getting full. Is there any way to forward any other domains to the new sme?
Title: Re: webmail.mydomain.com
Post by: Scott on August 09, 2003, 07:43:39 AM
<<Date:   05-29-03 00:09

I have two sme's 5.6. On my linksys router i forward the 80, 110 and 25 ports to one sme. On that server i have several domains but is getting full. Is there any way to forward any other domains to the new sme?>>>

This one is not to hard. On the sme machine you are using as your primary
dns server, create the host and enter the location as local. Enter the new machine's IP adress and then set the host up on the new machine. This should
redirect all of the requests to yourdmain.com on the new machine to the
new machine.

:)