Find the answer to your Linux question:
Results 1 to 4 of 4
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Victoria, British Columbia

    apache2 ignores ServerName in virtual host setup

    I am adding ssl to an existing server which is working just fine with one main server at port 80.

    All I am wanting to do is add ssl service. I now have the main server - port 80 - established in the Virtual Hosting Section of the config. I then added the ssl config paragraph, identifying the virtual host as (as compared with I set the ServerName to for the former and continued with for the latter. The CN record in the self-signed certificate agrees with, and the settings for the 2 virtual hosts are correct as diplayed by running httpd -S.

    However, attempting to access the secure server with firefox causes an error to be logged: CN does not match server name!?

    So ... something is ignoring or overwriting the ServerName setting in the setup of the secure port, but what and why??? There are no named hosts, only the2 mentioned above, so there is minimum complication here.

    I'm almost ready to slide in another nic card and make use of the unused static Ip I have from my telco.

    Ideas, anyone?

  2. #2
    Just Joined!
    Join Date
    May 2003
    Check out this sample ssl.conf file:

    That should help you get ssl working with your virtual hosts.

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Victoria, British Columbia
    Thanks for the suggestion ....

    What my problem related to was the 'confusion' built into the Mandriva distribution. I have it working fine now by tuning one option at a time ...

    In the main httpd.conf file I first commented out "Listen" and then replaced
    it with both "Listen" and "Listen". Mandriva supplies a default vhosts.conf. In that file I simply set up containers <VirtualHost*.443> and <VirtualHost *.80> with their associated ServerName, ServerPath DocumentRoot and Setenv VLOG equates.

    In the mod_ssl.conffile, I commented out "Listen -." which is now inherited, and in mod_ssl.default_vhost.conf, I commented out DocumentRoot for the same reason.

    That is not exactly what Mandriva seemed to have in mind, but it makes simple, straightforward sense to me and it also works!

  4. $spacer_open
  5. #4

    Exclamation I have same problem


    Tomcat version 5.5.12
    http version 2.2.2
    OS fedora core 5

    i tried to configure virtual hosting in my computer,

    i configured server as told in document,which i attached along with this mail,

    then i tried to config as followed command,i got followed Error

    Command : /usr/local/apache2/bin/apachectl configtest

    Error : "httpd: Syntax error on line 59 of /usr/local/apache2/conf/httpd.conf: Cannot load /usr/local/apache2/modules/ into server: /usr/local/apache2/modules/ wrong ELF class: ELFCLASS32 "

    at 59th line in httpd.conf [LoadModule jk_module modules/]

    i copied in to modules folder,i dowloaded that file from apache site,

    Tomcat is working fine,

    i did same configration in fedora core 4,it's works fine

    help me..


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts