参考 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. MyBatis笔记一:GettingStart

    MyBatis笔记一:GettingStart 1.MyBatis优点 我们的工具和各种框架的作用就是为了我们操作数据库简洁,对于一些数据库的工具能帮我们少写一些处理异常等等的代码,但是他们并不是自动 ...

  2. ubuntu18.4 搭建lamp环境

    一.Apache2 web服务器的安装: 可以先更新一下服务器(可选) 1.sudo apt update             # 获取最新资源包 2.sudo apt upgrade       ...

  3. 笔记66 Spring Boot快速入门(六)

    SpringBoot中使用Mybatis 一.注解方式 1.创建映射文件CategoryMapper.java 使用注解@Mapper 表示这是一个Mybatis Mapper接口.使用@Select ...

  4. 调试Android有什么错误

    项目目录的cmd调试查看有什么错误 gradlew processDebugManifest --stacktrace

  5. kafka为什么快?

    为什么Kafka那么快 原创 2016-07-18 fireflyc 写程序的康德 网上有很多Kafka的测试文章,测试结果通常都是"吊打"其他MQ.感慨它的牛B之余我觉得必要仔细 ...

  6. jmeter之-图形监控

    一.安装 https://jmeter-plugins.org/downloads/old/ 下载JMeterPlugins-Standard-1.4.0(监听器-图形界面)和ServerAgent- ...

  7. linux下vim编辑器查找 关键字

    在  linux  vim 编辑器 下查找   关键字 方法[一] 1?short_open_tag : 它的意思是vim 打开文件的第一行 ? : 它的意思是反向查找 short_open_tag ...

  8. WinDbg中Check for invalid symbols or bad syntax(断点设置)解决办法

    基础知识 bp 程序运行过程中下断点 bu 程序未加载之前下断点 bl  列出所有断点 bc  清除断点 今天在调试驱动的时候 发现下好断点后 无法调试 WinDbg显示 kd> g Break ...

  9. HDU 6693 Valentine's Day (概率)

    2019 杭电多校 10 1003 题目链接:HDU 6693 比赛链接:2019 Multi-University Training Contest 10 Problem Description O ...

  10. 利用OpenFileDialog 获取图片存储到数据库中

    private void button1_Click(object sender, EventArgs e)        {            string fName;            ...