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!
  • 相关阅读:
    linux十九压缩解压
    linux第十八dd命令
    【51单片机】数据类型
    【博客园】
    【C++】简介与环境的搭建
    【树莓派】安装TeamViewer
    【树莓派】Makefile的编写
    【cJSON库】cJSON库的使用
    【树莓派】忘记系统用户密码,如何重置密码
    【树莓派】树莓派与PC机通信
  • 原文地址:https://www.cnblogs.com/davidhhuan/p/1716903.html
Copyright © 2011-2022 走看看