ubuntu 18.04 修改Apache默认目录 安装是直接运行 sudu apt install apache2 安装之后要修改目录 vi /etc/apache2/sites-available/000-default.conf 我将里面的内容修改成下面 <VirtualHost *:80> # The ServerName directive sets the request scheme, hostname and port that # the server uses to ide
装了apache后,访问出现The requested URL *** was not found on this server,查看了下/etc/httpd/conf/httpd.conf,发现原因: 1.DocumentRoot指向错误,修改之(三处:apache2.conf.sites-available/000-default.conf.sites-enabled/000-default.conf),使其指向你所想指向的目录 apache默认访问目录为:/var/www/html .要做
Change the apache2 default website directory As we know, The apache2 default directory at /var/www/,If you want to modify it or you have some virtual hosts,You need to find the file which in "/etc/apache2/sites-enabled/000-default",Use vi editor