我有一个简单的网站放在一个名为test的文件夹中,所以我调用了http://localhost/test
,收到了一条Hello World!
消息。当我以HTTPS
模式调用它时,我也收到了相同的消息:https://localhost/test
。
问题是,在我将Webroot htdocs目录从/opt/lampp/htdocs
更改为/home/ubuntu/www
后,我仍然可以通过调用HTTP链接来看到hello-world消息,但当我调用HTTPS链接时,我得到:
Access forbidden!
You don't have permission to access the requested
directory. There is either no index document or the directory is
read-protected. If you think this is a server error, please contact
the webmaster. Error 403
解决方案是修改位于/etc/extra/中的httpd-ssl.conf文件,并将DocumentRoot"/opt/lamp/htdocs"所在的第86行修改为新目录"/home/ubuntu/www"