Networking Forums

Networking Forums > Computer Networking > Linux Networking > Apache virtual hosts not resolving correctly

Reply
Thread Tools Display Modes

Apache virtual hosts not resolving correctly

 
 
Ninjak on FW
Guest
Posts: n/a

 
      01-11-2007, 04:18 PM
Hello,

I'm having a problem with my Apache virtual hosts config. I'm mixing
http and https, here's my config:

NameVirtualHost *:80

<VirtualHost _default_:443>

DocumentRoot "/usr/share/squirrelmail"
ErrorLog logs/ssl_error_log
TransferLog logs/ssl_access_log
SSLEngine on
SSLCipherSuite
ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP
SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
SSLCertificateChainFile /etc/httpd/conf/ssl.crt/intermediate.crt
<Files ~ "\.(cgi|shtml|phtml|php3?)$">
SSLOptions +StdEnvVars
</Files>
<Directory "/var/www/cgi-bin">
SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
nokeepalive ssl-unclean-shutdown \
downgrade-1.0 force-response-1.0
CustomLog logs/ssl_request_log \
"%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>

<VirtualHost *:80>
DocumentRoot "/usr/share/timeclock"
ServerName timeclock.blahblah.com:80
</VirtualHost>



When I go to http://timeclock.blahblah.com I don't get directed to
/usr/share/timeclock, instead I get the Apache test page. I checked
permissions on the folder and files and they are fine. Any idea why
this isn't working correctly?

 
Reply With Quote
 
 
 
 
Giovanni
Guest
Posts: n/a

 
      01-11-2007, 04:51 PM
Ninjak on FW wrote:

> I'm having a problem with my Apache virtual hosts config. I'm mixing
> http and https, here's my config:
>
> NameVirtualHost *:80


This directive forces the server to handle virtual hosts on port 80 only.

> <VirtualHost _default_:443>
>


Ciao
Giovanni
--
A computer is like an air conditioner,
it stops working when you open Windows.
Registered Linux user #337974 < http://giovanni.homelinux.net/ >
 
Reply With Quote
 
shimmyshack
Guest
Posts: n/a

 
      01-11-2007, 04:51 PM

Ninjak on FW a écrit :
> Hello,
>
> I'm having a problem with my Apache virtual hosts config. I'm mixing
> http and https, here's my config:
>
> NameVirtualHost *:80
>
> <VirtualHost _default_:443>
>
> DocumentRoot "/usr/share/squirrelmail"
> ErrorLog logs/ssl_error_log
> TransferLog logs/ssl_access_log
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP
> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
> SSLCertificateChainFile /etc/httpd/conf/ssl.crt/intermediate.crt
> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
> SSLOptions +StdEnvVars
> </Files>
> <Directory "/var/www/cgi-bin">
> SSLOptions +StdEnvVars
> </Directory>
> SetEnvIf User-Agent ".*MSIE.*" \
> nokeepalive ssl-unclean-shutdown \
> downgrade-1.0 force-response-1.0
> CustomLog logs/ssl_request_log \
> "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot "/usr/share/timeclock"
> ServerName timeclock.blahblah.com:80
> </VirtualHost>
>
>
>
> When I go to http://timeclock.blahblah.com I don't get directed to
> /usr/share/timeclock, instead I get the Apache test page. I checked
> permissions on the folder and files and they are fine. Any idea why
> this isn't working correctly?


check your server name, I would put
ServerName timeclock.blahblah.com
myself.

you're probably getting the test page because no virtual host
servernames match.
Check that you are suing an HTTP/1.1 compliant user agent as well - you
must send the host name along too for apache to be able to match it.

 
Reply With Quote
 
Lew Pitcher
Guest
Posts: n/a

 
      01-11-2007, 07:31 PM

Giovanni wrote:
> Ninjak on FW wrote:
>
> > I'm having a problem with my Apache virtual hosts config. I'm mixing
> > http and https, here's my config:
> >
> > NameVirtualHost *:80

>
> This directive forces the server to handle virtual hosts on port 80 only.
>
> > <VirtualHost _default_:443>


In any case, port 443 is ssl http, and thus the url would have to start
with https:// not http:// as the OP had presented.

--
Lew

 
Reply With Quote
 
Phil Frisbie, Jr.
Guest
Posts: n/a

 
      01-12-2007, 01:03 AM
Ninjak on FW wrote:
> Hello,
>
> I'm having a problem with my Apache virtual hosts config. I'm mixing
> http and https, here's my config:
>
> NameVirtualHost *:80
>
> <VirtualHost _default_:443>


I hope you understand that SSL does not support virtual hosts.....

--
Phil Frisbie, Jr.
Hawk Software
http://www.hawksoft.com
 
Reply With Quote
 
Mark
Guest
Posts: n/a

 
      01-12-2007, 12:56 PM
"Ninjak on FW" <(E-Mail Removed)> wrote in news:1168535912.432404.37390@
77g2000hsv.googlegroups.com:

> Hello,
>
> I'm having a problem with my Apache virtual hosts config. I'm mixing
> http and https, here's my config:
>
> NameVirtualHost *:80
>
> <VirtualHost _default_:443>
>
> DocumentRoot "/usr/share/squirrelmail"
> ErrorLog logs/ssl_error_log
> TransferLog logs/ssl_access_log
> SSLEngine on
> SSLCipherSuite
> ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSL v2:+EXP
> SSLCertificateFile /etc/httpd/conf/ssl.crt/server.crt
> SSLCertificateKeyFile /etc/httpd/conf/ssl.key/server.key
> SSLCertificateChainFile /etc/httpd/conf/ssl.crt/intermediate.crt
> <Files ~ "\.(cgi|shtml|phtml|php3?)$">
> SSLOptions +StdEnvVars
> </Files>
> <Directory "/var/www/cgi-bin">
> SSLOptions +StdEnvVars
> </Directory>
> SetEnvIf User-Agent ".*MSIE.*" \
> nokeepalive ssl-unclean-shutdown \
> downgrade-1.0 force-response-1.0
> CustomLog logs/ssl_request_log \
> "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
> </VirtualHost>
>
> <VirtualHost *:80>
> DocumentRoot "/usr/share/timeclock"
> ServerName timeclock.blahblah.com:80
> </VirtualHost>
>
>
>
> When I go to http://timeclock.blahblah.com I don't get directed to
> /usr/share/timeclock, instead I get the Apache test page. I checked
> permissions on the folder and files and they are fine. Any idea why
> this isn't working correctly?
>
>


Try this....


NameVirtualHost *

<VirtualHost machine-ip-address>
DocumentRoot "/usr/share/timeclock"
ServerName timeclock.blahblah.com
</VirtualHost>



And you still need a ServerName in your SSL vhost container.



----== Posted via Newsfeeds.Com - Unlimited-Unrestricted-Secure Usenet News==----
http://www.newsfeeds.com The #1 Newsgroup Service in the World! 120,000+ Newsgroups
----= East and West-Coast Server Farms - Total Privacy via Encryption =----
 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Apache Virtual Hosts Rich Grise Linux Networking 6 12-25-2004 10:45 PM
Virtual hosts + proxypass question Chris Stoddart Linux Networking 1 12-06-2004 10:56 AM
apache viurtual hosts upro Linux Networking 2 11-25-2004 11:19 AM
virtual hosts, ownership of logs Ohmster Linux Networking 0 08-08-2004 03:33 AM
hosts file not working correctly? Mack B Windows Networking 1 05-04-2004 10:26 PM



1 2 3 4 5 6 7 8 9 10 11