VirtualHost always returns default host with Apache on Ubuntu 14.04

前端 未结 12 599
夕颜
夕颜 2021-01-30 07:16

I try to setup a virtual host besides the default localhost. Whenever I try to call my virtual host http://test I get the default Apache2 Index file t

12条回答
  •  深忆病人
    2021-01-30 07:34

    it has been driving me nuts too, I have cheked my .conf files over and over again all was absolutely defined correctly. I ended up on this post tried the a2ensite and a2dissite commands as a sudoer, restarting apache, still landing on the default apache welcome page as if apache would have never disabled the default site or taken my new virtual host onboard.

    It turns out I was trying to restart apache without using sudo...

    service apache2 restart
    

    use

    sudo service apache2 restart
    

提交回复
热议问题