Apache2 on Ubuntu 500 Internal Error

I tried to restart apache2 with the results below.  Looking through the apache logs I see errors around mod_wsgi (pid=22353): Target WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python module.

administrator@xojammer:/$ /etc/init.d/apache2 restart
Syntax error on line 55 of /etc/apache2/sites-enabled/akiri-remote-ssl:
SSLCertificateFile: file '/var/akiri/conf/ssl/server.crt' does not exist or is empty
Action 'configtest' failed.
The Apache error log may have more information.
   ...fail!


The error seen if browsing to host on port 80:

Internal Server Error

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, webmaster@localhost and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

Apache/2.2.16 (Ubuntu) Server at 10.10.10.190 Port 80



[Fri Oct 18 08:40:05 2013] [client 10.10.32.61] mod_wsgi (pid=18044): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61] mod_wsgi (pid=18044): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:40:05 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] mod_wsgi (pid=18045): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] mod_wsgi (pid=18045): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] mod_wsgi (pid=18044): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] mod_wsgi (pid=18044): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:40:14 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:43:22 2013] Exception KeyError: KeyError(-1218811248,) in
 <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Oct 18 08:43:22 2013] Exception KeyError: KeyError(-1218811248,) in
 <module 'threading' from '/usr/lib/python2.6/threading.pyc'> ignored
[Fri Oct 18 08:43:22 2013] [notice] caught SIGTERM, shutting down
[Fri Oct 18 08:43:23 2013] [warn] mod_wsgi: Compiled for Python/2.6.5.
[Fri Oct 18 08:43:23 2013] [warn] mod_wsgi: Runtime using Python/2.6.6.
[Fri Oct 18 08:43:23 2013] [notice] Apache/2.2.16 (Ubuntu) mod_ssl/2.2.16 OpenSS
L/0.9.8o mod_wsgi/3.2 Python/2.6.6 configured -- resuming normal operations
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] mod_wsgi (pid=22354): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] mod_wsgi (pid=22354): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] mod_wsgi (pid=22353): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] mod_wsgi (pid=22353): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:43:34 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] mod_wsgi (pid=22354): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] mod_wsgi (pid=22354): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] ImportError: No module n
amed index
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] mod_wsgi (pid=22353): Ta
rget WSGI script '/usr/share/akiri/conf/akiri.wsgi' cannot be loaded as Python m
odule.
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] mod_wsgi (pid=22353): Ex
ception occurred processing WSGI script '/usr/share/akiri/conf/akiri.wsgi'.
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] Traceback (most recent c
all last):
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]   File "/usr/share/akiri
/conf/akiri.wsgi", line 4, in <module>
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]     import akiri.mod_wsg
i
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]   File "/usr/lib/python2
.6/dist-packages/akiri/__init__.py", line 1, in <module>
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61]     from akiri.index imp
ort *
[Fri Oct 18 08:43:44 2013] [client 10.10.32.61] ImportError: No module n
amed index
LVL 2
amigan_99Network EngineerAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Kyle GreenCommented:
Can you please post the contents of /etc/apache2/sites-enabled/akiri-remote-ssl
0
amigan_99Network EngineerAuthor Commented:
I removed the comments (lines with leading #).  Let me know if those would be informative.


/etc/apache2/sites-enabled$ cat akiri-remote-ssl
<IfModule mod_ssl.c>
<VirtualHost _default_:443>
        ServerAdmin webmaster@localhost

    ServerName remote.akirisol.com
        DocumentRoot /var/www
        <Directory />
                Options FollowSymLinks
                AllowOverride None
        </Directory>
        <Directory /var/www/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride None
                Order allow,deny
                allow from all
        </Directory>

        ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
        <Directory "/usr/lib/cgi-bin">
                AllowOverride None
                Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
                Order allow,deny
                Allow from all
        </Directory>

        ErrorLog /var/log/apache2/error.log

        LogLevel warn

        CustomLog /var/log/apache2/ssl_access.log combined

        Alias /doc/ "/usr/share/doc/"
        <Directory "/usr/share/doc/">
                Options Indexes MultiViews FollowSymLinks
                AllowOverride None
                Order deny,allow
                Deny from all
                Allow from 127.0.0.0/255.0.0.0 ::1/128
        </Directory>

        SSLCertificateFile    /var/akiri/conf/ssl/server.crt
        SSLCertificateKeyFile /var/akiri/conf/ssl/server.key

        SSLCACertificateFile /var/akiri/conf/ssl/remote_akirisol_com.ca-bundle

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                SSLOptions +StdEnvVars
        </Directory>

        BrowserMatch "MSIE [2-6]" \
                nokeepalive ssl-unclean-shutdown \
                downgrade-1.0 force-response-1.0
        BrowserMatch "MSIE [17-9]" ssl-unclean-shutdown

</VirtualHost>
</IfModule>
0
Kyle GreenCommented:
It looks to me like you don't have a file at this location
SSLCertificateFile    /var/akiri/conf/ssl/server.crt

Make sure you've generated a certificate from your CA and saved it at that location with that filename.

Additionally if you'd like to set up a webex I don't mind looking at it with you. I have a Teamviewer client I can give you if you don't have any remote support solutions at your disposal.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
amigan_99Network EngineerAuthor Commented:
Excellent - thank you!
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Apache Web Server

From novice to tech pro — start learning today.