0

I changed the hostname (from something like "Ubuntu-14.04" to "mysitename.com") of my ubuntu-server. I also changed fully qualified domain name accordingly. After that I reloaded my apache2 server.

After that only the default config started to work with the default apache-page. I tried to add other configs, but they didn't work.

So I tried to reinstall apache2 (at first I'd been intended to reconfigure apache2, but there is no such command (or so I think) and I just decided to choose the simple path - reinstallation). But with the same result.

After that I tried to remove apache2 completely. I deleted every file that had "apache" in its name and installed apache2 again. Now it doesn't even show any message when I type "service apache2" in the console.

How can I reanimate apache2 and make it able to recognize configs other than the default one?

Thank you.

update. Ok, I just reinstalled Ubuntu. Now everything works fine.

serg66
  • 103
  • 3

1 Answers1

1

If you want a new vhost, you should put the vhost file at /etc/apache2/sites-available and do sudo a2ensite mynewsite where mynewsite is the filename. Then restart Apache to see the changes.

But first, check this link on how to cleanly reinstall Apache. (How do I cleanly remove apache2 server on ubuntu server and then reinstall?)

user241
  • 356
  • 2
  • 3
  • Thanks for the answer. I reinstalled Apache how it's described in the link, hoping that this time it'll work, but it didn't. The installation didn't have any errors, but when I type "service apache2" in the console, nothing happens: `root@mysite ~ # service apache2 root@mysite ~ # ` – serg66 Jun 19 '14 at 05:19