【发布时间】:2023-03-16 18:28:01
【问题描述】:
我在 Amazon Web Service Ubuntu 实例上安装了 apache2。如果我将 ip 放入浏览器 url 中的实例,它会成功调出默认的 apache 主页。该页面是从 /var/www/html 提供的。
现在我想调出存储在 /opt/Company/Product/index.html 中的真实网页。我在 var/www/html 中创建了一个指向 /opt/Company/Product 的符号链接,如下所示:
ln -s /opt/Company/Product Product
但是当我输入 ip/Product/index.html 时,我得到 404 Not Found 错误。
在我的 /etc/apache2/sites-available/000-default.conf 我有一个这样的虚拟主机:
<VirtualHost *:80>
DocumentRoot /var/www/html/Product
ServerName ip
<Directory /var/www/html/E360_UI/>
Options FollowSymLInks
</Directory>
</VirtualHost>
有什么建议吗?
【问题讨论】:
标签: apache amazon-web-services symlink