apache 站点配置
2017-02-08 14:44
405 查看
新建虚拟主机
修改hosts
开启主机重写(.htaccess)支持
修改apache配置文件
重启apache2
<VirtualHost *:80> ServerAdmin webmaster@localhost ServerName ubuntuuc.cc ServerAlias ubuntuc.cc DocumentRoot /vagrant/public/uc/public ErrorLog ${APACHE_LOG_DIR}/error.log CustomLog ${APACHE_LOG_DIR}/access.log combined </VirtualHost>
修改hosts
127.0.0.1 ubuntuuc.cc
开启主机重写(.htaccess)支持
sudo a2enmod rewrite sudo vim /etc/apache2/mods-enabled/rewrite.load #进去开启
修改apache配置文件
<Directory /> Options FollowSymLinks AllowOverride All #All才会使用带主机重写 Require all granted #granted才能访问到网站 </Directory>
重启apache2
sudo service apache2 restart
相关文章推荐
- apache的多站点虚拟主机配置方法
- Win2003完美配置Apache+IIS+Tomcat多站点
- 【转】apache 配置多站点
- 【小结】Apache 多个站点的配置
- 利用花生壳配置自己的站点:APACHE(PHP)多端口配置、远程登录、SVN、FTP等
- apache配置多个站点
- apache配置多站点多域名的方法
- [转]apache配置多个站点
- windows环境下apache配置多个站点
- Win2003完美配置Apache+IIS+Tomcat多站点
- windows下利用apache配置WEB站点 推荐
- windows apache 配置多个服务 站点 Apache Service Monitor
- apache的多站点配置方法
- Apache配置多个站点
- windows下为apache配置多个站点
- 基于Apache在本地配置多个虚拟主机站点
- windows下利用apache配置WEB站点
- Apache2.2.x+tomcat单IP多域名多站点的虚拟主机配置详解(win2003环境)
- APACHE多站点配置方法
- Apache本机不同端口多站点配置:httpd-vhosts.conf