zoukankan      html  css  js  c++  java
  • [eZ publish] How to set the SSL to a node?

    When I want to access a node of eZ via SSL, here are something to be done in my test envirement.

    1. Modify the setting file

    Open the file "settings/override/site.ini.append.php", add the code below :

    [SSLZoneSettings]
    SSLZones
    =enabled
    SSLSubtrees[]
    =/news/categoryOne

    Be aware to the red code, here i want to set to the node "/news/categoryOne", that is to say, when i visit the url "http://myhost/news/categoryOne", the browser will auto direct to "https://myhost/news/categoryOne".

    2. Modify the httpd.conf

    Here are the code of virtualhost.

    代码
    <VirtualHost 127.0.0.1:443>
    <Directory
    "/opt/lampp/htdocs/art">
    Options FollowSymLinks
    AllowOverride all
    Allow from all
    <
    /Directory>

    <IfModule mod_php5.c
    >
    php_admin_flag safe_mode Off
    php_admin_value register_globals
    0
    php_value magic_quotes_gpc
    0
    php_value magic_quotes_runtime
    0
    php_value allow_call_time_pass_reference
    0
    <
    /IfModule>

    DirectoryIndex index.php

    <IfModule mod_rewrite.c
    >
    RewriteEngine On
    RewriteRule content
    /treemenu/? /index_treemenu.php [L]
    Rewriterule ^
    /var/storage/.* - [L]
    Rewriterule ^
    /var/[^/]+/storage/.* - [L]
    RewriteRule ^
    /var/cache/texttoimage/.* - [L]
    RewriteRule ^
    /var/[^/]+/cache/texttoimage/.* - [L]
    RewriteRule ^
    /var/[^/]+/cache/public/.* - [L]
    Rewriterule ^
    /design/[^/]+/(stylesheets|images|javascript)/.* - [L]
    Rewriterule ^
    /share/icons/.* - [L]
    Rewriterule ^
    /extension/[^/]+/design/[^/]+/(stylesheets|images|flash|javascripts?)/.* - [L]
    Rewriterule ^
    /packages/styles/.+/(stylesheets|images|javascript)/[^/]+/.* - [L]
    RewriteRule ^
    /packages/styles/.+/thumbnail/.* - [L]
    RewriteRule ^
    /favicon\.ico - [L]
    RewriteRule ^
    /robots\.txt - [L]
    # Uncomment the following lines when using popup style debug.
    # RewriteRule ^/var/cache/debug\.html.* - [L]
    # RewriteRule ^/var/[^/]+/cache/debug\.html.* - [L]
    RewriteRule .* /index.php
    </IfModule>

    DocumentRoot "/opt/lampp/htdocs/art"

    SSLEngine on
    SSLCertificateFile
    /opt/lampp/etc/ssl.crt/server.crt
    SSLCertificateKeyFile /opt/lampp/etc/ssl.key/
    server.key
    ServerName myhost
    ServerAlias myhost admin.myhost
    <
    /VirtualHost>

    You will find that is very similar to set a common virtualhost, except the red code, because we have to access via SSL, so we have to use another port to it (Here i use the default port 443) , and also, open the SSLEngine, and set the certificate file and keyfile.

    After that, you can visit https://myhost/news/categoryOne via SSL.

  • 相关阅读:
    [轉]Linux kernel <2.6.29 exit_notify() local root exploit分析(2009-1337)
    [轉]udp_sendmsg空指针漏洞分析 by wzt
    linux 中mmap的用法
    [轉]Exploit The Linux Kernel NULL Pointer Dereference
    [轉]Exploit Linux Kernel Slub Overflow
    Linux 2.6.x fs/pipe.c local kernel root(kit?) exploit (x86)
    字符串哈希专题
    树形DP
    ACM中的正则表达式
    回文树学习笔记
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1771532.html
Copyright © 2011-2022 走看看