apache多站点泛解析配置

一,改版phalcon版本
1,下载phalcon版本控制到/home/apache/www/phalcon 下

$ svn co https://github.com/phalcon/cphalcon/tags/v1.2.3/ext /home/apache/www/phalcon

2,安装phalcon版本

$ cd /home/apache/www/phalcon
$ sudo ./install

3,安装完之后,

$ sudo make test;

二,配置apache2 多站点泛解析

1,到apache2配置文件目录下

$ cd /etc/apache2
$ sudo vim apache2.conf

2,注析引用路径的文件

如:
#Include sites-enabled/
#Include /home/apache/etc/sites-enabled/

3,添加
NameVirtualHost *:80
NameVirtualHost *:443
<VirtualHost *:80>
        VirtualDocumentRoot /home/apache/www/%0/
         <Directory /home/apache/www/>
                Options  FollowSymLinks MultiViews
                AllowOverride All
                Order allow,deny
                allow from all
        </Directory>
  
        #VirtualDocumentRoot /Users/apple/Documents/www/%0/
        ErrorLog "/var/log/apache2/error.vhost.log"
    CustomLog "/var/log/apache2/access.vhost.log" common
</VirtualHost>

4,引入ssl

$ sudo a2enmod ssl

创建证书

$ sudo openssl req -x509 -newkey rsa:1024 -keyout apache.pem -out apache.pem -nodes -days 999

5,引入alias vhost_alias

$ sudo a2enmod alias
$ sudo a2enmod vhost_alias

6,重写 rewrite

$ sudo a2enmod rewrite

你可能感兴趣的:(apache)