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.

closed as off-topic by user9517, Jenny D, Journeyman Geek, dawud, Ladadadada Jun 19 '14 at 13:11

This question appears to be off-topic. The users who voted to close gave these specific reasons:

  • "Questions must be relevant to professional system administration. Server Fault is dedicated to professional system and network administrators. End user and enthusiast questions are off-topic (contact your system administrator or hire a professional to help you out). Please see the Help Center for more information." – user9517, dawud
  • "Questions must demonstrate a minimal understanding of the problem being solved. Try including attempted solutions, why they didn't work, and the expected results. See How can I ask better questions on Server Fault? for further guidance." – Jenny D, Journeyman Geek
If this question can be reworded to fit the rules in the help center, please edit the question.

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?)

  • 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 5:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.