if I change hostname apache doesnt work

Posted August 30, 2016 2.3k views

Hi, I want to change my hostname (hostnamectl set-hostname lamp-512mb-nyc3-01) to the same as my domain (
But if I change with hostnamectl set-hostname

Then apache doesn’t work and showme 404 error.

Where also I need to change the hostname ?

  • A little more information would be helpful. What can you tell us about your apache configuration? Are you running multiple virtualhosts? Is the name of your apache virtualhost the same as the hostname you are setting? Is this the webroot ( ) that you are getting a 404 for or is it a specific page?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

I fixed it … I only need to disable 000-default of apache sites