首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何在其他分区ubuntu18.04中创建虚拟主机?

如何在其他分区ubuntu18.04中创建虚拟主机?
EN

Ask Ubuntu用户
提问于 2018-11-02 09:14:34
回答 1查看 210关注 0票数 1

我有一个/media/ramesh/Backend分区。我在这个分区中创建了一个文件夹,并添加了一个虚拟主机,如下所示:

步骤1:我通过这个代码sudo nano /etc/apache2/sites-available/reform.lan.conf创建了一个conf文件

第二步:里面的代码-

代码语言:javascript
复制
        ServerAdmin webmaster@reform
        ServerName reform.lan
        ServerAlias www.reform.lan
        DocumentRoot /media/ramesh/Backend/reform


   Options Indexes FollowSymLinks Includes ExecCGI
    AllowOverride All
    Require all granted
    Allow from all

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

第3步:通过sudo a2ensite reform.lan.conf启用站点

但是当我使用http://reform.lan/的时候

代码语言:javascript
复制
You don't have permission to access / on this server. error. 

我不能触发窃听器。

EN

回答 1

Ask Ubuntu用户

发布于 2018-11-02 09:38:30

您必须按以下方式更改/media/ramesh/Backend/reform的所有者:

代码语言:javascript
复制
sudo chown -R www-data:www-data /media/ramesh/Backend/reform
票数 0
EN
页面原文内容由Ask Ubuntu提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://askubuntu.com/questions/1089428

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档