apache 配置虚拟主机 url重写功能
2015-06-01 01:17
435 查看
<VirtualHost *:80>
# The ServerName
directive sets the request scheme, hostname and port that
# the server
uses to identify itself. This is used when creating
# redirection
URLs. In the context of virtual hosts, the ServerName
# specifies
what hostname must appear in the request's Host: header to
# match this
virtual host. For the default virtual host (this file) this
# value is not
decisive as it is used as a last resort host regardless.
# However, you
must set it for any further virtual host explicitly.
ServerName yourhost.com
ServerAdmin
webmaster@localhost
DocumentRoot
/var/www/rgrass/public
<Directory />
AllowOverride
All
Options
Indexes FollowSymLinks MultiViews
allow
from all
Order
allow,deny
</Directory>
<Directory /var/www/rgrass/public
>
Options
Indexes FollowSymLinks MultiViews
AllowOverride
All
Order
allow,deny
allow
from all
</Directory>
ScriptAlias
/cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride
None
Options
+ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order
allow,deny
Allow
from all
</Directory>
# Available
loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit,
alert, emerg.
# It is also
possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info
ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log
combined
# For most configuration
files from conf-available/, which are
# enabled or
disabled at a global level, it is possible to
# include a
line for only one particular virtual host. For example the
# following
line enables the CGI configuration for this host only
# after it has
been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
# The ServerName
directive sets the request scheme, hostname and port that
# the server
uses to identify itself. This is used when creating
# redirection
URLs. In the context of virtual hosts, the ServerName
# specifies
what hostname must appear in the request's Host: header to
# match this
virtual host. For the default virtual host (this file) this
# value is not
decisive as it is used as a last resort host regardless.
# However, you
must set it for any further virtual host explicitly.
ServerName yourhost.com
ServerAdmin
webmaster@localhost
DocumentRoot
/var/www/rgrass/public
<Directory />
AllowOverride
All
Options
Indexes FollowSymLinks MultiViews
allow
from all
Order
allow,deny
</Directory>
<Directory /var/www/rgrass/public
>
Options
Indexes FollowSymLinks MultiViews
AllowOverride
All
Order
allow,deny
allow
from all
</Directory>
ScriptAlias
/cgi-bin/ /usr/lib/cgi-bin/
<Directory "/usr/lib/cgi-bin">
AllowOverride
None
Options
+ExecCGI -MultiViews +SymLinksIfOwnerMatch
Order
allow,deny
Allow
from all
</Directory>
# Available
loglevels: trace8, ..., trace1, debug, info, notice, warn,
# error, crit,
alert, emerg.
# It is also
possible to configure the loglevel for particular
# modules, e.g.
#LogLevel info
ssl:warn
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log
combined
# For most configuration
files from conf-available/, which are
# enabled or
disabled at a global level, it is possible to
# include a
line for only one particular virtual host. For example the
# following
line enables the CGI configuration for this host only
# after it has
been globally disabled with "a2disconf".
#Include conf-available/serve-cgi-bin.conf
</VirtualHost>
相关文章推荐
- Apache Isis 1.4.0 发布,领域驱动开发框架
- Linux快速构建apache web服务器
- Awstats处理多apache日志
- 安装perl模块小窍门
- 互联网业内的迷雾 谨慎选择虚拟主机
- 选定虚拟主机 性能凸显优势
- 开通虚拟主机时提示Server.CreateObject失败的解决办法
- 用vbs实现虚拟主机和域名查循的脚本
- PHP+Apache在Windows 9x下的安装和配置
- Apache服务器配置全攻略
- Apache Web让JSP“动”起来
- Linux Apache+MySQL+PHP
- 建立Apache+PHP+MySQL数据库驱动的动态网站
- 星外虚拟主机平台国内五大域名接口设置方法
- apache 环境下 php 的配置注意事项
- 在RedHat下安装apache jserv 1.1.2方法
- windows中PHP5.2.14以及apache2.2.16安装配置方法第1/2页
- 在Windows XP下安装Apache+MySQL+PHP环境
- 解析阿里云ubuntu12.04环境下配置Apache+PHP+PHPmyadmin+MYsql
- apache rewrite防盗链三例