On 10/19/06, Joshua Slive <joshua@xxxxxxxx> wrote:
That's fine. But then you should post your best attempt at the proper
config. Not some garbage you are guessing at that has no resemblance
at all to the docs that you say you read. (I can't imagine how you
could have read those docs and come up with the config you posted.)
I posted the "garbage" since I didn't want my post to blow up and bug the members of this lis (I know that quite some guys dislike if somebody is posting the complete configs).
The docs didn't help me in that way since they just scratch the surface of a propper NameBased VHost config - what I'm missing here are some "real world-examples". I know that a lot of the Apache-developers that are contributung to the docs do this for free, and I really appreciate this, however, not everybody using Apache has the in-depth-knowledge like the contributors, and, most of the people also don't have the time to obtain this in-depth-knowledge.
You see, we're a financial company, and I'm really trying my best to convince ppl to ouse Open Source, and that really takes a lot of effort.
But I'm lost of all arguments if I don't have docs which are understandable with some real world examples or, worst (loke Tomcat) I sometimes have to debug the code to understand the principles.
The easy way would have been using IIS, where our corporate website is running on...
Anyways, you aksed for itm here you got it:
Again. Apache 2.0.55, Debian Sarge
This is from my apache2.conf
:
NameVirtualHost test-dom:80
NameVirtualHost test-dom:443
NameVirtualHost test-clue:80
NameVirtualHost test-ltc:80
Those are my vhost-defs (I'm ommitting some parts of which I think that they are not important).
<VirtualHost test-dom:80>
ServerAdmin webmaster@localhost
ServerName test-dom
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
ServerSignature Off
CustomLog /var/log/apache2/dom_access.log combined
ErrorLog /var/log/apache2/dom_error.log
#
RewriteEngine On
RewriteRule ^/(.*)$ https://%{HTTP_HOST}/$1
RewriteLog /var/log/apache2/dom_rewrite.log
RewriteLogLevel 9
</VirtualHost>
<VirtualHost test-dom:443>
ServerAdmin webmaster@localhost
ServerName test-dom
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
ServerSignature Off
CustomLog /var/log/apache2/dom-ssl_access.log combined
ErrorLog /var/log/apache2/dom-ssl_error.log
[ ... ]
# SSL
SSLEngine On
SSLCipherSuite HIGH:MEDIUM
SSLCertificateFile /etc/apache2/ssl/dom.crt
SSLCertificateKeyFile /etc/apache2/ssl/dom.key
DocumentRoot /var/www/ssl/dom
<Directory /var/www/ssl/dom>
Options FollowSymLinks
AllowOverride None
AuthName "DOM_Auth"
AuthType Cookie
CookieAuth on
CookieAuth_DBhost localhost
CookieAuth_DBName apacheSSO
CookieAuth_DBtable inter_sessions
CookieAuth_DBUser test
CookieAuth_DBPassword test
CookieAuth_UsernameField username
CookieAuth_SessnameField sessname
CookieAuth_SessvalField sesskey
CookieAuth_CookieName JSESSIONIDSSO
CookieAuth_ExpiryField expiry
# CookieAuth_RemoteIPField remoteip
CookieAuth_FailureURL /SingleSignOn
require valid-user
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Deny from all
</Directory>
</VirtualHost>
<VirtualHost test-clue:80>
ServerAdmin webmaster@localhost
ServerName test-clue
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
ServerSignature Off
CustomLog /var/log/apache2/clue-ssl_access.log combined
ErrorLog /var/log/apache2/clue-ssl_error.log
# SSL
# SSLEngine On
# SSLCipherSuite HIGH:MEDIUM
# SSLCertificateFile /etc/apache2/ssl/dom.crt
# SSLCertificateKeyFile /etc/apache2/ssl/dom.key
DocumentRoot /var/www/ssl/clue
<Directory /var/www/ssl/clue>
Options FollowSymLinks
AllowOverride None
AuthName "CLUE_Auth"
AuthType Cookie
CookieAuth on
CookieAuth_DBhost localhost
CookieAuth_DBName apacheSSO
CookieAuth_DBtable inter_sessions
CookieAuth_DBUser test
CookieAuth_DBPassword test
CookieAuth_UsernameField username
CookieAuth_SessnameField sessname
CookieAuth_SessvalField sesskey
CookieAuth_CookieName JSESSIONIDSSO
CookieAuth_ExpiryField expiry
# CookieAuth_RemoteIPField remoteip
CookieAuth_FailureURL /SingleSignOn
require valid-user
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Deny from all
</Directory>
</VirtualHost>
<VirtualHost test-ltc:80>
ServerAdmin webmaster@localhost
ServerName test-ltc
# don't loose time with IP address lookups
HostnameLookups Off
# needed for named virtual hosts
UseCanonicalName Off
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel debug
ServerSignature Off
CustomLog /var/log/apache2/ltc-ssl_access.log combined
ErrorLog /var/log/apache2/ltc-ssl_error.log
# SSL
# SSLEngine On
# SSLCipherSuite HIGH:MEDIUM
# SSLCertificateFile /etc/apache2/ssl/dom.crt
# SSLCertificateKeyFile /etc/apache2/ssl/dom.key
DocumentRoot /var/www/ssl/ltc
<Directory /var/www/ssl/ltc>
Options FollowSymLinks
AllowOverride None
AuthName "LTC_Auth"
AuthType Cookie
CookieAuth on
CookieAuth_DBhost localhost
CookieAuth_DBName apacheSSO
CookieAuth_DBtable inter_sessions
CookieAuth_DBUser test
CookieAuth_DBPassword test
CookieAuth_UsernameField username
CookieAuth_SessnameField sessname
CookieAuth_SessvalField sesskey
CookieAuth_CookieName JSESSIONIDSSO
CookieAuth_ExpiryField expiry
# CookieAuth_RemoteIPField remoteip
CookieAuth_FailureURL /SingleSignOn
require valid-user
Options -Indexes FollowSymLinks MultiViews
AllowOverride None
Order deny,allow
allow from all
</Directory>
ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride None
Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order allow,deny
Deny from all
</Directory>
</VirtualHost>
I've ommitted the jkmount-directives since I believe they are of no use for you at all.
I'd be happy (and I do NOT mean this in an ironic way) if you could point me to the point in the docs which tells me where my error is.
Again, when starting apache, currently I'm getting the following warning:
dekold4712:/etc/apache2/sites-available# /etc/init.d/apache2 restart
Forcing reload of web server: Apache2apache2: Could not determine the server's fully qualified domain name, using
10.170.202.5 for ServerName
[Thu Oct 19 19:13:23 2006] [warn] NameVirtualHost test-clue:80 has no VirtualHosts
[Thu Oct 19 19:13:23 2006] [warn] NameVirtualHost test-ltc:80 has no VirtualHosts
apache2: Could not determine the server's fully qualified domain name, using
10.170.202.5 for ServerName
[Thu Oct 19 19:13:24 2006] [warn] NameVirtualHost test-clue:80 has no VirtualHosts
[Thu Oct 19 19:13:24 2006] [warn] NameVirtualHost test-ltc:80 has no VirtualHosts
Cheers
Greg
--