Find the answer to your Linux question:
Results 1 to 4 of 4
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. ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1
    Just Joined!
    Join Date
    Nov 2004
    Location
    Victoria, British Columbia
    Posts
    2

    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 1.2.3.4:443 (as compared with 1.2.3.4:80). I set the ServerName to secure.mysite.com for the former and continued with www.mysite.com for the latter. The CN record in the self-signed certificate agrees with secure.mysite.com, 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 secure.mysite.com 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
    Location
    MD
    Posts
    12
    Check out this sample ssl.conf file: http://www.serversamples.com/view.php?sample=21

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

  3. #3
    Just Joined!
    Join Date
    Nov 2004
    Location
    Victoria, British Columbia
    Posts
    2
    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 0.0.0.0:80" and then replaced
    it with both "Listen 1.2.3.4:80" and "Listen 1.2.3.4:443". 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 -.0.0.0.0:443" 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. #4
    Just Joined!
    Join Date
    Jul 2006
    Posts
    4

    Exclamation I have same problem

    hi,


    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/mod_jk1.so into server: /usr/local/apache2/modules/mod_jk1.so: wrong ELF class: ELFCLASS32 "

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

    i copied mod_jk.so 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..

    by,
    guna

Posting Permissions

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