参考 Apache alias目录配置

我的环境是 Ubuntu apache2,配置文件目录在 /etc/apache2/sites-available/000-default.conf

在这个配置文件中,添加

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory> Alias /testweb /var/www/html/testweb/public <Directory /var/www/html/testweb/public>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
Order allow,deny
allow from all
</Directory>

如果启动了 ssl,在 ssl中的配置也是一样的

  1. Apache alias目录配置
  2. /etc/apache2/sites-enabled/000-default.conf
  3. Alias not working on Apache2.4

localhost 500 internal server

如果本地有 .htaccess,可能需要修改 Rewritebase /文件夹名称

apache httpd.conf alias的更多相关文章

  1. Apache httpd.conf配置文件 2(Main server configuration)

    ### Section 2: 'Main' server configuration # # The directives in this section set up the values used ...

  2. 关于apache httpd.conf脚本的理解

    新人一枚,这两天一直在研究lamp的搭建,感觉自己对apache理解的不够深彻,决定写这一篇(翻译)httpd.conf文件 未完待续 cat /usr/local/apache/conf/httpd ...

  3. apache httpd.conf

    Apache的主配置文件:/etc/httpd/conf/httpd.conf 默认站点主目录:/var/www/html/ Apache服务器的配置信息全部存储在主配置文件/etc/httpd/co ...

  4. apache httpd.conf 文件的 详解

    文章 摘自 :http://www.php100.com/html/webkaifa/apache/2009/0418/1192.html   ServerRoot /usr/local Server ...

  5. Apache httpd.conf 配置文件语法验证

    Apache 的 httpd.conf文件改动之后,必须重新启动server才干生效. 有时server在提供服务的时候,直接更改配置,重新启动服务.会带来非常大的危急性. 假设能在改动配置之后,先验 ...

  6. Apache httpd.conf配置文件 1(Global Environment )

    Apache 版本: Server version: Apache/2.2.15 总计 1000行左右 英文前带井号的是注释,不起作用. 但很多注释去掉前方的  #  即可生效. # # This i ...

  7. Apache httpd.conf配置文件 3(虚拟主机)

    ### Section 3: Virtual Hosts 第三部分 虚拟主机 注意:在使用虚拟主机前,请先检查  http.conf 的 辅助配置文件httpd-vhosts.conf 是否注释 # ...

  8. Apache httpd.conf的翻译

    本人初学,15年暑假翻译了一些,前几天翻译完,有机器翻译,也有自己翻译的内容,不准确之处请指出. --------------------------------------------------- ...

  9. Apache httpd.conf配置详解

    常用配置指令说明 1. ServerRoot:服务器的基础目录,一般来说它将包含conf/和logs/子目录,其它配置文件的相对路径即基于此目录.默认为安装目录,不需更改. 语法:ServerRoot ...

随机推荐

  1. android 样式和主题

  2. WPF textbox 鼠标滚动更新日期,text文本值更改

    /// <summary> /// 选择日期 /// </summary> private void RQTxt_MouseWheel(object sender, Mouse ...

  3. 关于solarwinds的一些介绍

    由于是给客户使用,作为运维人员自然是要安装测试一下的. solarwinds是一个付费的监控软件,部署起来很方便,加agent节点也很方便,除了监控主机,还可以监控网络流量,交换机等设备.由于并没有实 ...

  4. ZOJ3531: [SDOI2014] 旅行

    Description S国有N个城市,编号从1到N.城市间用N-1条双向道路连接,满足从一个城市出发可以到达其它所有城市.每个城市信仰不同的宗教,如飞天面条神教.隐形独角兽教.绝地教都是常见的信仰. ...

  5. js过滤字符串中的html标签

    var str = 'add<a>daad</a><p>fsdada</p>' str.replace(/<[^<>]+>/g, ...

  6. javascript基础总结之实例(二)

    div的显示和隐藏 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://w ...

  7. 如何使用android-support-V7包中ActionBar(Eclipse版)

    $*********************************************************************************************$ 博主推荐 ...

  8. js 读取本地文件(必须通过input控件才能实现) 及 下载文件

    js 操作 文件的实现原理: 1.js是不能直接操作(读写)文件的,html的  input[type="file"] 控件是可以读取文件数据(获取文件数据流)的.js可以获取这个 ...

  9. css3 动画+动画库

    css3 动画 实现原理 1.transition 过渡:https://www.runoob.com/cssref/css3-pr-transition.html 语法:( transition的 ...

  10. python 模块-json

    1.JSON(Javascript Object Notation) 是一种轻量级的数据交换格式.易于人阅读和编写.同时也易于机器解析和生成.它基于JavaScript Programming Lan ...