CLOSED: Update-Problems With Apache

amahiuser1
Posts: 15
Joined: Mon Aug 06, 2012 4:30 am

CLOSED: Update-Problems With Apache

Postby amahiuser1 » Mon Dec 08, 2014 3:12 pm

I foolishly upgraded my 12.04 ubuntu server. Now I need help in working through the mess this caused :(

dist upgrade broke my dashboard. using the network-troubleshooter gave me:

http://pastebin.ubuntu.com/9432577/

trying to start apache manually results in:

Code: Select all

root@home:/# service apache2 start * Starting web server apache2 * * The apache2 configtest failed. Output of config test was: apache2: Syntax error on line 214 of /etc/apache2/apache2.conf: Could not open configuration file /etc/apache2/httpd.conf: No such file or directory Action 'configtest' failed.
/var/log/apache2/error.log contains:
http://pastebin.ubuntu.com/9432689/

What can I do to get the dashboard back?

Update:
The httpd.conf error seems to be another apache bug:
http://serverfault.com/questions/500803 ... tu-upgrade

doing a

Code: Select all

touch /etc/apache2/httpd.conf
will help.

Unfortunately this only brings out the next error:

Code: Select all

apache2: Syntax error on line 238 of /etc/apache2/apache2.conf: Could not open configuration file /usr/share/hdactl/httpd/: No such file or directory
After commenting the corresponding line in the configfile it's:

Code: Select all

AH00526: Syntax error on line 55 of /etc/apache2/apache2.conf: Invalid command 'LockFile', perhaps misspelled or defined by a module not included in the server configuration
Could it be the apache configfile structure has changed in the upgrade? Is there a way to create a new one? Reinstalling apache didn't seem to help.

Code: Select all

apt-get --reinstall install apache2 didn't help
Last edited by amahiuser1 on Tue Dec 09, 2014 4:53 am, edited 1 time in total.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Update-Problems With Apache

Postby bigfoot65 » Mon Dec 08, 2014 3:50 pm

Recommend you check out the Amahi 6 Troubleshotting page in the wiki. There is a bug for apache with a solution that might take care of your issue.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

amahiuser1
Posts: 15
Joined: Mon Aug 06, 2012 4:30 am

Re: Update-Problems With Apache

Postby amahiuser1 » Tue Dec 09, 2014 2:36 am

There is a bug for apache with a solution that might take care of your issue.
Thanks, but that bug is about locks and permissions. I fixed it (thanks to the wiki) some time ago.

Code: Select all

luser@home:~$ ls -l /var/lock/apache2 total 0
I believe my current problem is about an invalid configfile - maybe the amahi one somehow got overwritten or moved?
Any ideas on that front? Re-running the installer or copying files from another installation maybe?

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Update-Problems With Apache

Postby bigfoot65 » Tue Dec 09, 2014 9:03 am

Understand.

When you updated apache, did it prompt about keeping current configuration or using new one? Check in /etc/apache directory to see if there are multiple apache.conf files.

Have you rebooted since this problem occurred? Often when updating the OS, a new Linux kernel is installed. That typically requires a reboot.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

amahiuser1
Posts: 15
Joined: Mon Aug 06, 2012 4:30 am

Re: Update-Problems With Apache

Postby amahiuser1 » Tue Dec 09, 2014 9:17 am

When you updated apache, did it prompt about keeping current configuration or using new one?
Check in /etc/apache directory to see if there are multiple apache.conf files.
Yes. I choose to keep the old one since I didn't think about a possible change of format and didn't want to lose my dashboard/webapps.
Probably should have mentioned that part, my apologies.
Using your hint I copied over apache2.conf.dpkg-dist which seems to be the new default config file (no idea why it's not created as apache2.conf when reinstalling). With this I now get the "Apache2 Ubuntu Default Page" when trying to connect to the dashboard or any of my webapps.
It seems I just need to add the right folder to the .conf to get all functionality back up. Any pointers as to which one that might be?
Have you rebooted since this problem occurred? Often when updating the OS, a new Linux kernel is installed. That typically requires a reboot.
Yes. Multiple times.

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Update-Problems With Apache

Postby bigfoot65 » Tue Dec 09, 2014 9:37 am

Did you by chance keep a copy of the apache.conf file before you made the most recent change? If so, recommend you do a diff on the two files to see what's different.

Worst case scenario, I can get a copy of the apache.conf file from my test machine and provide to you.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

amahiuser1
Posts: 15
Joined: Mon Aug 06, 2012 4:30 am

Re: Update-Problems With Apache

Postby amahiuser1 » Tue Dec 09, 2014 10:25 am

Did you by chance keep a copy of the apache.conf file before you made the most recent change? If so, recommend you do a diff on the two files to see what's different.
Unfortunately there are no leads as to the proper directory in it. A few locates later I found the virtual host definitions in /etc/httpd/config.d/
Adding that to apache2.conf like so:

Code: Select all

Include /etc/httpd
gives me trouble when restarting apache:

Code: Select all

AH00526: Syntax error on line 20 of /etc/httpd/conf.d/1004-apps-proxy.conf: Either all Options must start with + or -, or no Option may.
Removing the only + in each of the definitions (+ExecCGI) gets me forward one error at a time.

Edit:
And with this all the virtualpages (web-apps) are online again.
The one thing i'm still missing is the dashboard itself. Unfortunately I have no idea where to look for that one.
Any input?
Worst case scenario, I can get a copy of the apache.conf file from my test machine and provide to you.
Thanks :)

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Update-Problems With Apache

Postby bigfoot65 » Tue Dec 09, 2014 2:45 pm

Please the following command and post the results.

Code: Select all

sudo ls -al /etc/apache/conf.d
Also it might be best if I provide you the Amahi default install apache.conf file. If you continue to mess with the file, you might cause more issues.

Please PM me and I will provide it.
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

amahiuser1
Posts: 15
Joined: Mon Aug 06, 2012 4:30 am

Re: Update-Problems With Apache

Postby amahiuser1 » Wed Dec 10, 2014 1:27 am

Code: Select all

root@home:/etc/apache2$ sudo ls -al /etc/apache/conf.d ls: cannot access /etc/apache/conf.d: No such file or directory root@home:/etc/apache2$ sudo ls -al /etc/apache2/conf.d total 12 drwxr-xr-x 2 root root 4096 Dec 10 09:13 . drwxr-xr-x 10 root root 4096 Dec 10 09:13 .. -rw-r--r-- 1 root root 853 May 18 2013 monitorix.conf lrwxrwxrwx 1 root root 28 Aug 9 2012 phpmyadmin.conf -> ../../phpmyadmin/apache.conf lrwxrwxrwx 1 root root 29 Aug 9 2012 squirrelmail.conf -> /etc/squirrelmail/apache.conf root@home:/etc/apache2$ sudo ls -al /etc/httpd/conf.d/ total 80 drwxr-xr-x 2 www-data apache 4096 May 28 2013 . drwxr-xr-x 3 root root 4096 Aug 3 2012 .. -rw-r--r-- 1 root root 21 Aug 3 2012 00-init.conf -rw-r--r-- 1 root root 2201 Aug 3 2012 01-platform.conf -rw-r--r-- 1 root root 511 Aug 3 2012 03-calendar.conf -rw-rw-r-- 1 www-data users 495 Dec 9 18:16 1000-ajaxplorer.conf -rw-rw-r-- 1 www-data users 486 Dec 9 18:17 1001-phpsysinfo.conf -rw-rw-r-- 1 www-data users 564 Dec 9 18:17 1002-extplorer.conf -rw-rw-r-- 1 www-data users 501 Dec 9 18:18 1003-loganalyzer.conf -rw-rw-r-- 1 www-data users 764 Dec 9 18:26 1004-apps-proxy.conf -rw-rw-r-- 1 www-data users 456 Dec 9 18:27 1005-linfo.conf -rw-rw-r-- 1 www-data users 574 Dec 9 18:36 1006-monitorix.conf -rw-rw-r-- 1 www-data users 498 Dec 9 18:36 1007-greyhole-log.conf -rw-rw-r-- 1 www-data users 495 Dec 9 18:37 1008-phpmyadmin.conf -rw-r--r-- 1 root root 469 Dec 9 18:37 1009-squirrelmail.conf -rw-rw-r-- 1 nobody nogroup 486 Dec 9 18:38 1010-filterpage.conf -rw-rw-r-- 1 nobody nogroup 534 Dec 9 18:38 1010-squirrelmailwebapp.conf -rw-rw-r-- 1 www-data users 474 Dec 9 18:38 1011-tinytodo.conf -rw-rw-r-- 1 www-data users 456 Dec 9 18:38 1012-gh-du.conf -rw-rw-r-- 1 www-data users 471 Dec 9 18:39 1013-rcmail.conf
I think I now know why access to the dashboard doesn't work anymore:

Code: Select all

AH00548: NameVirtualHost has no effect and will be removed in the next release /etc/httpd/conf.d/00-init.conf:1 AH00112: Warning: DocumentRoot [/var/hda/platform/html/public] does not exist
The virtualhost declarations work - it's just that the directory they point to does not exist:

Code: Select all

luser@home:/etc/apache2$ ls /var/hda/platform/html/public ls: cannot access /var/hda/platform/html/public: No such file or directory
I suspect it does on your testmachine?
In case the specific path listed here does not work: conf.d/01-platform.conf contains the path to the (suspected) dashboard sources via DocumentRoot entry.

Code: Select all

luser@home:/etc/httpd/conf.d$ cat 01-platform.conf | grep platform/ DocumentRoot /var/hda/platform/html/public ErrorLog /var/hda/platform/logs/error_log CustomLog /var/hda/platform/logs/access_log combined env=!dontlog RewriteRule ^/_PKGS/(.*)$ /var/hda/platform/apps/$1 [last] RewriteRule ^/images/\.\./_PKGS/(.*)$ /var/hda/platform/apps/$1 [last] RewriteRule ^/_USERS/(.*)$ /var/hda/platform/users/$1 [last] <Directory /var/hda/platform/html/public>

User avatar
bigfoot65
Project Manager
Posts: 11924
Joined: Mon May 25, 2009 4:31 pm

Re: Update-Problems With Apache

Postby bigfoot65 » Wed Dec 10, 2014 6:03 pm

There could be one or more things missing from the apache.conf file. Recommend you PM me and I will send you the default Amahi installed apache.conf file.

This might be a sign you should upgrade to Amahi 7 :D
ßîgƒσστ65
Applications Manager

My HDA: Intel(R) Core(TM) i5-3570K CPU @ 3.40GHz on MSI board, 16GB RAM, 1TBx1+2TBx2+4TBx2

Who is online

Users browsing this forum: No registered users and 6 guests