zoukankan      html  css  js  c++  java
  • [eZ publish] How to set the VirtualHost

    The OS is ubuntu, use lampp which located in /opt/lampp
    1. Modify the file of /opt/lampp/etc/httpd.conf

     

    NameVirtualHost ez.39.lan.gz:80
     
    <VirtualHost ez.39.lan.gz:80>
        <Directory "/media/MyDocuments/xampp/htdocs/ez">
        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|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 "/media/MyDocuments/xampp/htdocs/ez"
        ServerName ez.39.lan.gz
        ServerAlias ez.39.lan.gz admin.ez.39.lan.gz
    </VirtualHost>
    <VirtualHost xampp:80>
        <Directory "/media/MyDocuments/xampp/htdocs/xampp/">
        </Directory>

        DocumentRoot "/media/MyDocuments/xampp/htdocs/xampp/"
        ServerName xampp
        ServerAlias xampp
    </VirtualHost>
    2. Modify the file which located in/media/MyDocuments/xampp/htdocs/ez/settings/override/site.ini.append.phpof the eZ publish, find out the "SiteAccessSettings" block

     

    [SiteAccessSettings]
    ForceVirtualHost=true
    MatchOrder=true
    HostMatchMapItems[]
    HostMatchMapItems[]=ez.39.lan.gz;my_site
    HostMatchMapItems[]=admin.ez.39.lan.gz;my_site_admin
    3. Modify the hosts of the OS, /etc/hosts

     

    127.0.0.1   ez.39.lan.gz
    127.0.0.1   admin.ez.39.lan.gz
    127.0.0.1   xampp
    Have fun!
  • 相关阅读:
    comparator接口与Comparable接口的区别
    heap和stack有什么区别
    聚集索引和非聚集索引(整理)
    SQL里的EXISTS与in、not exists与not in
    SQL中CONVERT转化函数的用法
    GCC 对C语言的扩展
    C++宏定义详解
    How to Find Processlist Thread id in gdb !!!!!GDB 使用
    Netdata----Linux 性能实时监测工具
    java开发C语言编译器
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1716903.html
Copyright © 2011-2022 走看看