Ubuntu: Problem with apache



Question:

I have problem with apache, when I get configure a LAMP then I write:

sudo apt-get install apache2  

And everything been fun, but next I wrote

cd /etc/apache2/mods-available  sudo cp * /etc/apache2/mods-enabled  

And when I start a apache I get error log

"* Starting web server apache2                                                                    *    * The apache2 configtest failed.  Output of config test was:  apache2: Syntax error on line 140 of /etc/apache2/apache2.conf: Syntax error on line 1 of /etc/apache2/mods-enabled/lua.load: Cannot load /usr/lib/apache2/modules/mod_lua.so into server: /usr/lib/apache2/modules/mod_lua.so: cannot open shared object file: No such file or directory  Action 'configtest' failed."  

How I can repair this? Please give a simple council because this is my first time on ubuntu. (I have ubuntu 14.04 LTS)


Solution:1

Files in /etc/apache2/mods-enabled are supposed to be links to files in mods-available, so delete those files which are not links:

sudo find /etc/apache2/mods-enabled -type f -exec rm {} +  

And in the future, use a2enmod and a2dismod.


Solution:2

Lua support in Apache in 14.04LTS is broken, see also: mod_lua is missing in 14.04?

Apparently, a patch has been around for a while now, but no one has bothered shipping the fix yet. See also: https://bugs.launchpad.net/ubuntu/+source/apache2/+bug/1323930, specifically - have a look at the suggested work-around.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »