当我这样做的时候:
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)使用停止apache
sudo service apache2 stop给我的提示是‘这个站点无法访问’,所以apache提供的是这个默认页面。
那么,在没有启用任何站点的情况下显示apache默认页面合适吗?
后续:如何将不同的目录设为默认目录?我设置了一个test.conf
<VirtualHost 127.0.0.2:80>
ServerAdmin webmaster@localhost
DocumentRoot /home/myusername/websites/wp-test-site/site
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>我以为启用它会使默认站点文件夹为/home/myusername/websites/wp-test- site /site,但事实并非如此。
是的,我正在用sudo重新开始。
发布于 2016-05-28 14:16:15
将.htaccess文件添加到文档根目录。将默认文件更改为如下所示
DirectoryIndex index.php default.html现在将一些index.php放到文档根目录中。接下来,您可以从索引文件中指向指向用户的位置。
https://stackoverflow.com/questions/37244278
复制相似问题