Issue with ubuntu 16.04 after migration

November 5, 2018 521 views
Apache LAMP Stack Configuration Management Ubuntu 16.04

Hi all,

I'm having an issue after an Emergency Droplet Migration had been performed.

The server is up and running, however this shows the default page ("Please log into you droplet...") instead of the site content. This I would assume means it's reading from the default config file instead of the ones I had set up for our site.

On checking the configs, the default was not present in the sites enabled directory and a "sudo apache2ctl -S" revealed that the default config files for 80 and 443 being used are correct. Furthermore, looking in those files the doc root and directory are pointing to the right location.

I also ran an "a2ensite" on the config files previously in use to again ensure these are enabled with no issue.

A couple of other things to mention is that when I run service apache2 reload I have the error: "apache2.service is not active, cannot reload.". A "apachectl stop" returned "apache2.service is not active, cannot reload." and running "apachectl stop" returned "httpd (no pid file)" (these were attempted after reading up on similar issues).

Any help provided would be a massive help.

Thanks

2 Answers

Hey friend!

Is there any chance that you have two web servers installed, and the one currently running is not the one you intend to have running? Let's say, for example, you had Apache installed and then turned it off to install Nginx. On reboot, Apache would likely start first, causing Nginx to fail to start (because it couldn't bind to the ports). This could be the reversed scenario just as easily.

Jarland

Hi Jarland,

Yes, Nginx also loaded on retart. I removed nginx and now on loading the using the domain name I'm getting a "This site cannot be reached". The site forces the load of the https version, which is correct and tells me apache confs are being read. I have to do more investigating why it cannot be reached though.

Thanks

Have another answer? Share your knowledge.