Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Apache warnings...
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
zambizzi
Guru
Guru


Joined: 28 Aug 2004
Posts: 581
Location: Boise Idaho

PostPosted: Mon Sep 13, 2004 9:24 pm    Post subject: Apache warnings... Reply with quote

I've configured a couple of VirtualHosts in Apache and I'm trying to eliminate any and all warnings or problems resulting from my configuration.

In my current config...I get these warnings when rebooting my server, however, everything works as it should...like I said, I'd just like to get rid of them and understand why I'm getting them:

Code:

root@localhost user # /etc/init.d/apache2 restart
 * Stopping apache2...
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Sep 14 05:08:08 2004] [warn] NameVirtualHost www.domain.com:80 has no VirtualHosts
[Tue Sep 14 05:08:08 2004] [warn] NameVirtualHost www.domain.com:443 has no VirtualHosts       [ ok ] * Starting apache2...
apache2: Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName
[Tue Sep 14 05:08:10 2004] [warn] NameVirtualHost www.domain.com:80 has no VirtualHosts
[Tue Sep 14 05:08:10 2004] [warn] NameVirtualHost www.domain.com:443 has no VirtualHosts       [ ok ]


...as you can see, 2 ports, one for the regular site on 80 and another for 443 for SSL. Each has 2 entries, one for appending www. to the domain and one to call it by domain name only (i.e. www.domain.com/domain.com)

Here is my vhosts.conf file:

Code:


NameVirtualHost domain.com:80
<VirtualHost 123.123.123.123:80>
        DocumentRoot /var/www/localhost/htdocs/domain.com
        ServerName domain.com
        ErrorLog /var/www/localhost/htdocs/domain.com/logs/domain-error_log
</VirtualHost>

NameVirtualHost www.domain.com:80
<VirtualHost 123.123.123.123:80>
        DocumentRoot /var/www/localhost/htdocs/domain.com
        ServerName www.domain.com
        ErrorLog /var/www/localhost/htdocs/domain.com/logs/domain-error_log
</VirtualHost>

#SSL for both domains...

<IfModule mod_ssl.c>

NameVirtualHost domain.com:443
<VirtualHost 123.123.123.123:443>
    DocumentRoot /var/www/localhost/htdocs/domain.com
    ServerName supreme-greens.com
    ErrorLog /var/www/localhost/htdocs/domain.com/logs/ssl_error_log

    <IfModule mod_log_config.c>
      TransferLog logs/ssl_access_log
    </IfModule>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/domain.com.crt
    SSLCertificateKeyFile conf/ssl/domain.com.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
      SSLOptions +StdEnvVars
    </Files>

    <Directory "/home/httpd/cgi-bin">
      SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
      CustomLog /var/www/localhost/htdocs/domain.com/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteOptions inherit
    </IfModule>
</VirtualHost>

</IfModule>

NameVirtualHost www.domain.com:443
<VirtualHost 123.123.123.123:443>
    DocumentRoot /var/www/localhost/htdocs/domain.com
    ServerName www.domain.com
    ErrorLog /var/www/localhost/htdocs/domain.com/logs/ssl_error_log

    <IfModule mod_log_config.c>
      TransferLog logs/ssl_access_log
    </IfModule>

    SSLEngine on
    SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
    SSLCertificateFile conf/ssl/domain.com.crt
    SSLCertificateKeyFile conf/ssl/domain.com.key

    <Files ~ "\.(cgi|shtml|phtml|php?)$">
      SSLOptions +StdEnvVars
    </Files>

    <Directory "/home/httpd/cgi-bin">
      SSLOptions +StdEnvVars
    </Directory>

    <IfModule mod_setenvif.c>
      SetEnvIf User-Agent ".*MSIE.*" nokeepalive ssl-unclean-shutdown \
      downgrade-1.0 force-response-1.0
    </IfModule>

    <IfModule mod_log_config.c>
      CustomLog /var/www/localhost/htdocs/domain.com/logs/ssl_request_log \
      "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
    </IfModule>

    <IfModule mod_rewrite.c>
      RewriteEngine On
      RewriteOptions inherit
    </IfModule>
</VirtualHost>

</IfModule>



What am I doing wrong? Is there a better (perhaps less verbose) way of doing the same thing?

Thanks!!
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Wed Sep 15, 2004 5:15 am    Post subject: Reply with quote

I remember reading somewhere that apache has problems when using ssl and enabling vhosts. I'll try to look it up somewhere and post a possible fix for it.
Back to top
View user's profile Send private message
Shopro
l33t
l33t


Joined: 12 May 2004
Posts: 678
Location: Dayton, OH, USA

PostPosted: Wed Sep 15, 2004 5:20 am    Post subject: Reply with quote

Maybe this one helps you with your problem.
https://forums.gentoo.org/viewtopic.php?t=74889&highlight=apache+vhosts
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum