I have installed apache2 server with ubuntu 18.04.
(我已经用ubuntu 18.04安装了apache2服务器。)
I have started the service and I am able to see the localhost
page for ubuntu. (我已经启动了该服务,并且能够看到ubuntu的localhost
页面。)
Then I created a new configuration in the /etc/apache2/sites-available
named mysite.conf
, and it looks like the below configuration. (然后,我在/etc/apache2/sites-available
创建了一个名为mysite.conf
的新配置,它看起来像下面的配置。)
<VirtualHost example222.com:80>
ServerName www.example222.com
ServerAlias example222.com
ServerAdmin [email protected]
DocumentRoot /var/www/example222/html
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
I enabled this configuration using sudo a2ensite mysite.conf
and restarted the apache2 server using sudo service apache2 restart
.
(我使用sudo a2ensite mysite.conf
启用了此配置,并使用sudo service apache2 restart
重启了apache2服务器。)
I have a directory /var/www/example222/html
which contains an index.html
file. (我有一个目录/var/www/example222/html
,其中包含一个index.html
文件。)
After doing all this I am not able to visit www.example222.com
on my local network.
(完成所有这些操作后,我将无法访问我的本地网络上的www.example222.com
。)
I don't understand the mistake I have made. (我不明白我犯的错误。)
Please help. (请帮忙。)
I have followed following tutorial: https://help.ubuntu.com/lts/serverguide/httpd.html
(我遵循了以下教程: https : //help.ubuntu.com/lts/serverguide/httpd.html)
ask by MSS translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…