Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a freshly set up domain and server. The server is set up with squirrelmail and ISPConfig. When I refer to the server's IP I'm taken to the /var/www folder, however if I refer to the domain name www.example.com I'm taken to /var/www/example.com/web/, which makes accessing /var/www/webmail impossible.

I'm wondering if the same error is the reason why sending mail to example.com can't be done, even though addresses in ISPConfig is set up. For instance, the address tomas@example.com is created in ISPConfig, but when I send a mail to that address I get an automated reply from www.example.com saying "user "tomas" does not exist under example.com"

I'm guessing I've done something wrong by adding the domain that hosts ISPConfig, under ISPConfig.

Could someone request additional information or shed some light on this quanandrum

share|improve this question
add comment

2 Answers 2

up vote 0 down vote accepted

Your webserver is using "name based" virtual hosts, and has the DocumentRoot for the site named www.example.com set to /var/www/example.com/web/. This sounds like something ISPConfig would do since it's a control panel for setting up hosted sites.

The obvious answer would be to move /var/www/webmail to /var/www/example.com/web/webmail (or to just use http://1.1.1.1/webmail/ rather than your example.com hostname).

As for the mail, there are two possibilities, either your mailserver wasn't configured by ISPConfig to use it's virtual user list, or your MX record for example.com is pointing somewhere else, so mail gets delivered there instead of to you.

share|improve this answer
add comment

There is an another way for doing it.

edit your /etc/apache2/httpd.conf

Add the following line to it.

Alias /webmail /usr/share/squirrelmail

Replace the /usr/share/squirrelmail with the path of your mail (I haven't tested it with a document inside /var/www).

Restart apache by

service apache2 restart

You are ready to rock.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.