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.

  • 相关阅读:
    多线程创建方式四种

    归并排序
    Spark调优之--资源调优、并行度调优
    多线程中的上下文切换
    守护线程和本地线程
    线程和进程的区别
    3. 无重复字符的最长子串
    [蓝桥杯][历届试题]连号区间数
    [蓝桥杯][历届试题]蚂蚁感冒
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1771532.html
Copyright © 2011-2022 走看看