当我转到我的ip地址时,会提供一个索引文件。然而,当我导航到我的域名,一个网页是不服务的。Apache不会提供我(域名)网站目录中的内容。
在虚拟主机实现合法之前,我不打算安装PHP或数据库。
为了将我的网站迁移到虚拟服务器上,我已经重新安装了我的映像很多次了。最大的症结是配置虚拟主机。我最近的尝试是使用这篇博客文章:https://www.tecmint.com/install-apache-with-virtual-hosts-on-debian-10/
在此之前,这是本文之前的尝试:https://www.digitalocean.com/community/tutorials/how-to-install-linux-apache-mariadb-php-lamp-stack-on-debian-10
我也看过这篇文章:https://linuxize.com/post/how-to-set-up-apache-virtual-hosts-on-debian-10/
在我的互联网搜索过程中,我看到了一个名为www-data的用户的名字,但在我引用的三个博客文章中没有提到它。
我的托管公司一直告诉我要使用Plesk,但是他们没有为迁移扩展配置共享的托管环境。所以我不能使用Plesk迁移,如果Plesk许可证安装在映像上,他们会向我收取每月费用。
<VirtualHost *:80>
ServerName example.com
ServerAlias www.example.com
ServerAdmin webmaster@example.com
DocumentRoot /var/www/html/example.com
<Directory /var/www/html/example.com>
Options -Indexes +FollowSymLinks
AllowOverride All
</Directory>
ErrorLog ${APACHE_LOG_DIR}/example.com-error.log
CustomLog ${APACHE_LOG_DIR}/example.com-access.log combined
/etc/apache2/站点-现有/example.com.conf
发布于 2022-03-11 15:22:13
这可能不是正确的答案,但我进入我的文件/etc/apache2/sites-enabled/000-default.conf
并将行更改为:
#<VirtualHost *:80>
<VirtualHost *:8888>
#DocumentRoot /var/www/html
DocumentRoot /home/MyPath/Drives/02000/www
发布于 2022-03-11 17:36:29
我在其他浏览器中查看了域名,Chrome正在根据我的请求强制使用HTTPS。由于与虚拟主机的混淆,我没有重新安装SSL/TLS。因此,基本上整个页面都是活动的,但Chrome不愿连接,因为没有安全连接。
https://stackoverflow.com/questions/71445286
复制相似问题