Apache will not start
-
I was trying to move my image storage location to an external HDD connected to my FOG Machine. Info is in this post: https://forums.fogproject.org/topic/5027/moving-images-and-changing-image-location/21?page=1
Since running the installer again with the new image location specified I am now having an issue with APache starting. Errors below:
Command line error when attempting start:
mj@fog-server:/opt/trunk/bin$ sudo service apache2 start
•Starting web server apache2 *
•The apache2 configtest failed.
Output of config test was:
AH00526: Syntax error on line 12 of /etc/apache2/sites-enabled/001-fog.conf:
SSLCertificateFile: file ‘/var/www/fog/management/other/ssl/srvpublic.crt’ does not exist or is empty
Action ‘configtest’ failed.
The Apache error log may have more information.Apache error log repeated error:
[Tue May 26 16:23:52.091869 2015] [:error] [pid 10042] [client 172.25.100.46:58826] PHP Warning: mysqli::real_escape_string(): Couldn’t fetch mysqli in /var/www/fog/lib/db/MySQL.class.php on line 146, referer: http://172.25.5.80/fog/management/index.php?node=home
[Tue May 26 16:23:53.348758 2015] [mpm_prefork:notice] [pid 10036] AH00169: caught SIGTERM, shutting down -
Solved as the Apache error is corrected for in latest svn.
-
Please try these commands:
sudo rm -rf /opt/fog/snapins/CA /opt/fog/snapins/SSL /var/www/fog/management/other/ssl
Edit the installer updater piece in /opt/fog/.fogsettings and delete the last two lines of the file:
They should look like:
caCreated="yes" and maybe vhostCreated="yes"
if you don’t have those lines then don’t worry about it.
Then try re-running the installer.
-
I ran all my commands with sudo, that should be fine right?
-
This thread suggests it’s your user authority that might be the problem: http://serverfault.com/questions/416612/apache-sslcertificatekeyfile-file-does-not-exist-or-is-empty
Try running the previously suggested commands as root.
-
Nope still fails!!
-
Alreasy tried to reinstall now?
-
hmmm…the ssl directory is missing from within snapins
-
Now I am missing:
SSLCertificateKeyFile: file ‘/opt/fog/snapins/ssl/.srvprivate.key’ does not exist or is empty
-
Sorry, you don’t have to paste your V-Host Config, wouldn’t help.
Try to put my srvpublic.crt to the location, mentioned by the error. Maybe this helps
srvpublic.zip -
/etc/apache2/sites-enabled
-
Where would I find that?
-
Can you paste your V-Host config?
-
I have not manually tried reinstalling Apache, but I don’t think that will fix it as the error message from Apache states:
SSLCertificateFile: file ‘/var/www/fog/management/other/ssl/srvpublic.crt’ does not exist or is empty
When I look in that location the file doesn’t exist.
-
Tried to reinstall Apache manually?
-
Yes, I have. The install reports that Apache fails to start.
-
Already tried to reinstall FOG?
-
Done that several times.
-
Try to restart the server, may helps.
-
mj@fog-server:/opt/trunk/bin$ sudo apt-get install php5-mysqlnd
Reading package lists… Done
Building dependency tree
Reading state information… Done
php5-mysqlnd is already the newest version.
The following package was automatically installed and is no longer required:
account-plugin-windows-live
Use ‘apt-get autoremove’ to remove it.
0 upgraded, 0 newly installed, 0 to remove and 28 not upgraded.