开发者社区 问答 正文

如何在 apache 上部署静态页面

自己尝试了一下,一直是:
You don't have permission to access / on this server.

各位给个靠谱的教程可好?如果是中文就更好了。

附 /etc/apache2/conf-available 文件

<Directory /home/aias/testWEB>
    Options Indexes FollowSymLinks
    AllowOverride None
    Require all granted
</Directory>

<IfModule dir_module>
DirectoryIndex index.html
</IfModule>

展开
收起
爵霸 2016-06-17 11:13:56 2808 分享 版权
1 条回答
写回答
取消 提交回答
  • sites-enabled 和sites-available文件夹是不是也需要相应的配置?
    是的。在之前配置的基础上,配置sites-enabled和sites-available就行了。写好配置文件做个连接

    <VirtualHost *:80>
        ServerAdmin webmaster@localhost
        DocumentRoot /home/aias/testWEB
    </VirtualHost>

    就可以了

    2019-07-17 19:42:14
    赞同 展开评论
问答分类:
问答地址: