Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache2 Virtual Host configuration not working

Status
Not open for further replies.

jaimitoc30

Programmer
Aug 14, 2012
1
PA
Hi, I have an issue with Apache Virtual hosts. I installed a web server and mail server. Apache, PHP, MySQL and Postfix Dovecot ClamAV Amadis Spamassasin a RoundCube for Webmail on a Centos 6 box.

Now, my issue is that I have my DNS like this:

@ x.x.x.x A record
CNAME
webmail domain.com CNAME



Now, I can access my email via web using roundcube like this:
However, when I try to access it redirects me to the default page when an index is not found.

My Virtual host configuration is like this:

NameVirtualHost *:80

<VirtualHost *:80>
ServerName ServerAlias DocumentRoot /srv/ErrorLog /srv/CustomLog /srv/ combined
</VirtualHost>

<VirtualHost *:80>
DocumentRoot /usr/share/roundcubemail
ServerName webmail.domain.com
</VirtualHost>

I believe there is something with my vhost configuartion above, however, can figure it out, since I have read a lot and all the vhost files seems to be exactly like mine. So, I can't get webmail.domain.com to go to my roundcube webmail and I ahve been fighting with this all day long.

Can someone help me with this, if you need further information, please let me know. Also, even if I use http, it changes it to https... I generated self signed certificates for my email access. For apache SSL conf I have these lines:

<VirtualHost _default_:443>

# General setup for the virtual host, inherited from global configuration
DocumentRoot "/var/ServerName
# Use separate log files for the SSL virtual host; note that LogLevel
# is not inherited from httpd.conf.
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
LogLevel warn


Of course there is more, but I believe that info may be enough. Please, can someone help me with this?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top