Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old August 14th, 2012, 12:10 PM
jaimitoc30 jaimitoc30 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 37 jaimitoc30 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 44 m 41 sec
Reputation Power: 1
general - Apache Virtual Host for subdomain

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
www domain dot com CNAME
webmail domain dot com CNAME



Now, I can access my email via web using roundcube like this: (URL address blocked: See forum rules)

However, when I try to access (URL address blocked: See forum rules) it redirects me to the default page when an index is not found.

My Virtual host configuration is like this:

Code:
NameVirtualHost *:80

<VirtualHost *:80>
ServerName (URL address blocked: See forum rules)
ServerAlias (URL address blocked: See forum rules)
DocumentRoot /srv/www/domain dot com/public_html/
ErrorLog /srv/www/domain dot com/logs/error.log
CustomLog /srv/www/domain dot com/logs/access.log combined
</VirtualHost>

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


I believe there is something with my vhost configuartion above, however, cant 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 dot domain dot 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/www/html"
ServerName (URL address blocked: See forum rules):443

# 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?

Sorry for the domain dot com but due to forum rules, since I am a new member I cant use URLs, so hope you understand. Regards.

Reply With Quote
  #2  
Old August 14th, 2012, 12:46 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,696 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 4 h 42 m 26 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
I, for one, can't really tell what you're saying without those URLs. Yeah it's inconvenient, we know. How about doing the "www dot domain dot com" thing for those?

Reply With Quote
  #3  
Old August 14th, 2012, 02:09 PM
jaimitoc30 jaimitoc30 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 37 jaimitoc30 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 44 m 41 sec
Reputation Power: 1
Quote:
Originally Posted by requinix
I, for one, can't really tell what you're saying without those URLs. Yeah it's inconvenient, we know. How about doing the "www dot domain dot com" thing for those?


Thank you for your reply. thats what I did, if you see... instead of a . there is a dot

Reply With Quote
  #4  
Old August 14th, 2012, 03:16 PM
requinix's Avatar
requinix requinix is offline
Still alive
Click here for more information.
 
Join Date: Mar 2007
Location: Washington, USA
Posts: 12,696 requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)requinix User rank is General 120th Grade (Above 100000 Reputation Level)  Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1Folding Points: 417516 Folding Title: Super Ultimate Folder - Level 1
Time spent in forums: 5 Months 1 Week 4 Days 4 h 42 m 26 sec
Reputation Power: 8969
Send a message via AIM to requinix Send a message via MSN to requinix Send a message via Yahoo to requinix Send a message via Google Talk to requinix
Quote:
Originally Posted by jaimitoc30
Thank you for your reply. thats what I did, if you see... instead of a . there is a dot

For a couple, yes. But there's also
Quote:
Now, I can access my email via web using roundcube like this: (URL address blocked: See forum rules)

However, when I try to access (URL address blocked: See forum rules) it redirects me to the default page when an index is not found.

Code:
ServerName (URL address blocked: See forum rules)
ServerAlias (URL address blocked: See forum rules)

Code:
ServerName (URL address blocked: See forum rules):443

Reply With Quote
  #5  
Old August 14th, 2012, 03:29 PM
jaimitoc30 jaimitoc30 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 37 jaimitoc30 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 44 m 41 sec
Reputation Power: 1
Quote:
Originally Posted by requinix
For a couple, yes. But there's also

Code:
ServerName (URL address blocked: See forum rules)
ServerAlias (URL address blocked: See forum rules)

Code:
ServerName (URL address blocked: See forum rules):443


I am sorry for that, Here is my entire post again:

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
www domain dot com CNAME
webmail domain dot com CNAME



Now, I can access my email via web using roundcube like this: (www dot domain dot com /webmail)

However, when I try to access (webmail dot domain dot com) 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 (www dot domain dot com)
ServerAlias (www dot domain dot com)
DocumentRoot /srv/www/domain dot com/public_html/
ErrorLog /srv/www/domain dot com/logs/error.log
CustomLog /srv/www/domain dot com/logs/access.log combined
</VirtualHost>

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

I believe there is something with my vhost configuartion above, however, cant 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 dot domain dot 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/www/html"
ServerName www dot domain dot com:443

# 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?

Sorry for the domain dot com but due to forum rules, since I am a new member I cant use URLs, so hope you understand. Regards.

Reply With Quote
  #6  
Old August 14th, 2012, 03:30 PM
jaimitoc30 jaimitoc30 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 37 jaimitoc30 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 44 m 41 sec
Reputation Power: 1
I was checking SSL logs and found this:}

[Tue Aug 14 15:17:22 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Aug 14 15:17:23 2012] [warn] RSA server certificate is a CA certificate (BasicConstraints: CA == TRUE !?)
[Tue Aug 14 15:17:45 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/
[Tue Aug 14 15:17:47 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/
[Tue Aug 14 15:17:48 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/
[Tue Aug 14 15:17:49 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/
[Tue Aug 14 15:17:49 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/
[Tue Aug 14 15:17:50 2012] [error] [client x.x.x.x] Directory index forbidden by Options directive: /var/www/html/

Not sure if it is related, but it must be, cause that is the only error I can find when trying to access webmail dot domain dot com

Reply With Quote
  #7  
Old August 15th, 2012, 11:14 PM
jaimitoc30 jaimitoc30 is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2012
Posts: 37 jaimitoc30 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 6 h 44 m 41 sec
Reputation Power: 1
Well I didnt receive any reply. but after reading and reading keep trying I was able to resolve this issue. This was caused by this:

When I tried to access webmail.domain.com it changed to https, that is because roundcube configuration was configured to force ssl, so basically instead of using virtual host *:80 for webmail.domain.com it was using the virtual host listed at ssl.conf which had _default_:443 and it had documentroot set to the folder that was appearing when I tried to access webmai.domain.com instead of the roundcube web interface. SO I just changed the documentroot in that _default_:443 virtual host container to point to roundcube. Next time I need another SSL virtual host will modify that, but for the moment it is working now. HOpe this helps somebody else.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > general - Apache Virtual Host for subdomain

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap