/etc/apache2/sites-avaiable/domain.com.conf

9 posts / 0 new
Last post
#1 Mon, 07/14/2014 - 09:24
igorocampos

/etc/apache2/sites-avaiable/domain.com.conf

Hi, I am intending to make one of my domains redirect from webmail.domain.com to domain.com/roundcube, just because people are more used to type webmail.domain.com

I searched and found how to make a global roundcube server. But that wasnt the case... So I looked in my apache's config and found theses conf files in /etc/apache2/sites-avaiable/domain.com.conf

Inside this particular domain, I changed to:

RewriteCond %{HTTP_HOST} =webmail.domain.com RewriteRule ^(.*) http://domain.com/roundcube [R]

but it didnt work...

What else shoul I do?

Mon, 07/14/2014 - 10:28
andreychek

Howdy,

What you did there should definitely work.

Did you by chance restart Apache afterwards? Without restarting Apache those settings wouldn't actually become active.

-Eric

Mon, 07/14/2014 - 10:34
igorocampos

I reboot the machine...

I also noticed that www.domain.com is not redirecting to domain.com, Already checked the DNS seems ok... You think these are related?

Mon, 07/14/2014 - 11:55
igorocampos

Ok, look what I saw right now:

Failed to start service : * Starting web server apache2 * * The apache2 configtest failed. Output of config test was: AH00526: Syntax error on line 28 of /etc/apache2/sites-enabled/domain.com.conf: RewriteRule: bad flag delimiters Action 'configtest' failed. The Apache error log may have more information.

Mon, 07/14/2014 - 12:10
igorocampos

Fixed, but I still dont know why it is not working...

If I try to ping in webmail.domain.com it doesnt translate to my VPS IP as it does when I ping at www.domain.com, should I create a CNAME for webmail???

Mon, 07/14/2014 - 12:27
andreychek

Where is the DNS being hosted for this domain? Is it being hosted by Virtualmin, or by a third party?

If it's hosted by Virtualmin, all the DNS entries are created automatically.

But if it's by a third party, you'll need to manually setup every DNS entry you wish to use, including webmail.domain.com.

-Eric

Mon, 07/14/2014 - 13:20
igorocampos

I guess it was hosted by third party... I have a VPS at digital ocean. And they have a DNS manager there, when I added the webmail CNAME, it started to work!

How could I host DNS by Vitualmin ?

Mon, 07/14/2014 - 13:26
andreychek

Howdy,

You can find information on that in the section titled "How do I setup nameservers for my server" of the following documentation:

https://www.virtualmin.com/documentation/dns/faq

Mon, 07/14/2014 - 13:35
igorocampos

Alright! Thank you!

Topic locked