apache服务器设置
2015-12-14 15:53
543 查看
服务器目录
目录说明
bin: apache常用的一些命令
cgi-bin:存放一些脚本语言命令
conf:apache配置文件
error:错误记录
htodcs存放站点文件
logs:记录日志
modules:存放apache模块(动态库)
虚拟目录
指定某个目录为虚拟目录(e:/virtual)编辑httpd.conf文档
① 指定虚拟目录
<IfModule dir_module>
#欢迎页面,默认访问页面
DirectoryIndex index.php index.php3 index.html index.htm
#站点别名
#如D:/ test下有个a.html,则访问方式为www.yourweb.com/test/a.html
Alias /test “D:/test”
</IfModule>
② 设置访问权限
<Directory “D:/test”>
Order allow,deny
Deny from all //拒绝所有访问者
Allow from localhost //放行localhost
</Directory>
虚拟主机配置
启用虚拟主机设置Include conf/extra/httpd-vhosts.conf
编辑httpd-vhosts.conf设置虚拟主机
<VirtualHost *:80>
ServerAdmin webmaster@dummy-host2.hleclerc-PC.ingenidev
DocumentRoot "E:/PHP/"
//一台服务器上可能有多个虚拟主机
//使用ServerName以便加以区分
ServerName www.dy-pc.com
<Directory "E:/PHP/">
Options FollowSymLinks
//设置不允许被覆盖
AllowOverride None
Order deny,allow
allow from all
</Directory>
apache配置命令
相关文章推荐
- apache服务器设置
- 用apache commons-pool2建立thrift连接池
- 严重: Exception occurred during processing request: org.apache.struts2.json.JSONException: org.hiberna
- Linux(CentOS)下的apache服务器配置与管理
- apache ab测试并发命令的使用
- Could not resolve archetype org.apache.maven.archetypes:maven-archetype-quickstart
- java.lang.NoClassDefFoundError: org/apache/juli/logging/LogFactory
- linux下关于Apache设置二级域名绑定二级目录的方法
- Google推出Apache加速模块 速度提高50%!
- Working with Apache Derby
- apache .htaccess文件详解和配置技巧总结
- 基于mac系统的apache服务器的使用流程
- java.lang.NullPointerException at org.apache.jsp.**_jsp.jspInit(index_jsp.java)异常 解决方案
- Apache 基金会宣布 Apache Kylin 成为顶级项目
- Apache日志解读 每列代表什么
- php学习日记第二棒(Apache 安装和配置)
- 使用 apache flex mavenizer 将flex sdk 4.6 maven化
- 阿里云ECS Apache+php+mysql环境搭建
- rg.apache.maven.archetypes:maven-archetype-quickstart:1.1 from any of the configured repositories
- Apache conf文件配置个人总结