Question : Resolve a URL to our address AND path

We have a web server that also is an email server (sendmail, qpopper).  This has been working very well and continues to do so.

I recently added wedmail support to the server to allow remote web based access to email, but the URL is rather clumsy and I have received requests to see about creating an alias for it.

Currently the URL to get webmail is
    "./cgi-bin/webmail.cgi"

I would like to make it
    "email."

I don't know how I would do this via DNS or if it is possible.

I need to know how I can do this for remote employees to get and send email.

Thanks

Answer : Resolve a URL to our address AND path

Howdy,

Here is what I ended up doing.

DNS
     I defined a webmail.<our domain> CNAME record in DNS to resolve to our current smtp server IP

     I also defined an email.<our domain> CNAME record in DNS to resolve to the same address.


Apache
     I created rewrite rule in the /etc/apache2/httpd.conf file to catch the incoming URL and
     rewrite the URL to the correct path.

     Here are the httpd.conf file lines that I added for the virtual host.

<VirtualHost <our internal non-routable IP> <our external routable IP>>

    ServerName email.<our domain>
    ServerAlias webmail.<our domain>t

    RewriteEngine on

    RewriteCond %{HTTP_HOST}  email\.<our domain>  [OR]
    RewriteCond %{HTTP_HOST}  webmail\.<our doamin>
    RewriteRule .*  http://smtp.<our doamin>/cgi-bin/webmail\.cgi  [R=permanent]

    UserDir disabled

    DocumentRoot /tmp

    ServerAdmin admin@<our domain>

    ErrorLog /<internal path>/email-error.log

</VirtualHost>

Random Solutions  
 
programming4us programming4us