2016-05-15 50 views
1

当我这样做:如果没有启用网站,应该显示apache默认页面吗?

sudo a2dissite 

我得到

Your choices are: 

意味着所有的网站都被禁止。

当我把我的IP本地网络地址放在浏览器中时,我得到了默认的Apache页面。

http://192.168.1.101/ (putting this in the browser address bar gets me the default apache page) 

sudo service apache2 stop 

停止Apache给了我 '该网站无法到达',那么Apache是​​服务于默认页。

那么,当没有网站启用时,是否显示apache默认页面?

后续工作:我将如何制作一个不同的目录默认?我有一个test.conf设立

<VirtualHost 127.0.0.2:80> 

    ServerAdmin [email protected] 
    DocumentRoot /home/myusername/websites/wp-test-site/site 

    ErrorLog ${APACHE_LOG_DIR}/error.log 
    CustomLog ${APACHE_LOG_DIR}/access.log combined 

</VirtualHost> 

我认为这使这将使默认的站点文件夹中的/ home /名为myUsername /网站/ WP-测试网站/网站,但事实并非如此。

是的我重新启动与sudo。

回答

0

将.htaccess文件添加到文档根目录。 更改缺省的文件中显示如下

DirectoryIndex index.php default.html 

现在把一些在index.php的文档根目录。 接下来,您可以从索引文件指向指向用户的位置。

相关问题