Loading...

Tagged: apache RSS

  • The SourceBench 3:48 am on November 27, 2009 Permalink | Reply
    Tags: apache, http, https, rewrite, virtual host   Posted in Plain Text

    Redirecting from http to https via mod_rewrite 

    RewriteEngine on
    RewriteCond %{SERVER_PORT}      !^443$
    RewriteRule ^/(.*)              https://%{SERVER_NAME}/$1 [L,R]

     
  • The SourceBench 3:36 am on November 27, 2009 Permalink | Reply
    Tags: apache, certificate, crt, csr, key, ssl   Posted in Bash/shell

    Create a self signed SSL Certificate (server.key/pem/csr/crt file) 

    #The following commands will generate you server.key/pem/csr/crt files, needed for working with apache/ssl on port 443. You can replace -days #365 with any value you want.
    openssl genrsa -des3 -rand file1:file2:file3:file4:file5 -out server.key 1024
    openssl rsa -in server.key -out server.pem
    openssl req -new -key server.key -out server.csr
    openssl x509 -req -days 365 -in server.csr -signkey server.key -out server.crt
    #If you plan using valid SSL certificate, signed by thawte for example, then when entering data for creating .csr file, you have to enter valid data, #and then send this file to them. They will return the .crt file.

     
c
compose new post
j
next post/next comment
k
previous post/previous comment
r
reply
e
edit
o
show/hide comments
t
go to top
l
go to login
h
show/hide help
esc
cancel