[users@httpd] Apache 2.0.53 & ssl & virtual hosts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello.
I have compiled this version of apache with ssl support. I do following:
CC=gcc ./configure --prefix=/usr/local/apache2053 \
--with-mpm=worker --enable-so --enable-layout=Apache \
--enable-mods-shared=most --enable-maintainer-mode --with-expat=`pwd`/srclib/apr-util/xml/expat \
--enable-static-support --enable-auth-digest --enable-ssl
I have make certificates and put in right directory for domain2.com:
# /usr/local/ssl/misc/CA.sh -newca
# openssl genrsa -des3 -out server.key 1024
# openssl req -new -key server.key -out server.csr
# /usr/local/ssl/misc/CA.sh -signreq

I have several virtualhost like:

<VirtualHost 172.26.0.3>
    ServerAdmin root@xxxxxxxxxxx
    DocumentRoot /web1/htdocs
    ServerName domain1.com
    ServerAlias www.domain1.com
</VirtualHost>
<VirtualHost 172.26.0.3>
    ServerAdmin root@xxxxxxxxxxx
    DocumentRoot /web2/htdocs
    ServerName domain2.com
    ServerAlias www.domain2.com
</VirtualHost>
Then i need domain2.com works with ssl then i have this lines inside httpd.conf and ssl.conf about ssl:
httpd.conf:

<IfDefine SSL>
LoadModule ssl_module modules/mod_ssl.so
</IfDefine>
<IfModule mod_ssl.c>
   Include conf/ssl.conf
</IfModule>

ssl.conf:

SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
<IfDefine SSL>
Listen 443
AddType application/x-x509-ca-cert .crt
AddType application/x-pkcs7-crl    .crl
SSLPassPhraseDialog  builtin
SSLSessionCache         dbm:/usr/local/apache2/logs/ssl_scache
SSLSessionCacheTimeout  300
SSLMutex  file:/usr/local/apache2/logs/ssl_mutex
<VirtualHost _default_:443>
DocumentRoot "/usr/local/apache2/htdocs"
ServerName domain1.com:443
ServerAdmin root@xxxxxxxxxxx
ErrorLog /usr/local/apache2/logs/error_log
TransferLog /usr/local/apache2/logs/access_log
SSLEngine on
SSLCipherSuite ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP:+eNULL
SSLCertificateFile /usr/local/apache2/conf/ssl.crt/server.crt
SSLCertificateKeyFile /usr/local/apache2/conf/ssl.key/server.key
<Files ~ "\.(cgi|shtml|phtml|php3?|php)$">
   SSLOptions +StdEnvVars
</Files>
<Directory "/usr/local/apache2/cgi-bin">
   SSLOptions +StdEnvVars
</Directory>
SetEnvIf User-Agent ".*MSIE.*" \
        nokeepalive ssl-unclean-shutdown \
        downgrade-1.0 force-response-1.0
CustomLog /usr/local/apache2053/logs/ssl_request_log \
         "%t %h %{SSL_PROTOCOL}x %{SSL_CIPHER}x \"%r\" %b"
</VirtualHost>
</IfDefine>

My question is:
Do i need to change anything in httpd.conf ?
What do i must change in ssl.conf to use ssl with domain2.com ?
If i need to use another domain3.com with ssl do i must create another certificates ?

if you can show me an example step by step i will be very gratefull or do you know a good link ?

Thanks.


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux