【发布时间】:2014-07-04 01:15:44
【问题描述】:
我正在远离 AMPPS / MAMP,并希望构建一个尽可能接近生产环境的开发环境。
因此,我在安装了 CentOS 6.4 64 位操作系统的 Mac 上使用 Vagrant / VirtualBox。
在我的 vagrant 文件中,我有一个配置脚本:
config.vm.provision :shell, :path => "bootstrap.sh"
目前,我的 bootstrap.sh 如下所示:
#!/usr/bin/env bash
# Install the remi repos
sudo rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm
# Update the repositories
sudo yum -y update
sudo yum -y --enablerepo=remi,remi-php55 install php-pecl-apc php-cli php-pear php-pdo php-mysqlnd php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml
现在我已经安装了我的 apache 服务器,我希望我的 bash 脚本编辑 /etc/httpd/conf/httpd.conf 文件并将我的 html 目录中的 AllowOverride None 更改为 AllowOverride All。
<Directory "/var/www/html">
...
Options Indexes FollowSymLinks
...
# Need to change this to AllowOverride All via bash script
AllowOverride None
...
Order allow,deny
Allow from all
</Directory>
【问题讨论】:
标签: linux apache bash mod-rewrite