WebFaction
Community site: login faq

I am trying to install mod_evasive on webfaction and i get an error permission denied because it is trying to install in usr/lib folder. I have tried to install it in webapps/{appname}/apache2/modules through

apxs -c mod_evasive20.c --libexecdir="/home/madawar/webapps/qlipper/apache2/modules" --prefix="/home/madawar/webapps/qlipper/apache2/lib"

But it is not working how would i compile an apache module in a local directory with apxs?

asked 08 Sep '12, 17:32

MadawarDawar's gravatar image

MadawarDawar
111
accept rate: 0%


The '--libexecdir' and '--prefix=' flags will set this for most modules. There are instances which this is not the case, such as poorly written install code or the installation of a module which assumes you have root access.

We would need to be able to see the complete error being generated and possibly the install script it is fetching itself.

permanent link

answered 08 Sep '12, 17:57

johns's gravatar image

johns ♦♦
4.8k29
accept rate: 23%

Command:

apxs -cia mod_evasive20.c --libexecdir="/home/madawar/webapps/qlipper/apache2/modules" --prefix="/home/madawar/webapps/qlipper/apache2/lib"

Produces

/var/www/build/libtool --silent --mode=compile gcc -prefer-pic   -DLINUX=2 -D_REENTRANT -D_GNU_SOURCE -g -O2 -pthread -I/usr/include/httpd  -I/usr/include/httpd   -I/usr/include/httpd   -c -o mod_evasive20.lo mod_evasive20.c && touch mod_evasive20.slo
/var/www/build/libtool --silent --mode=link gcc -o mod_evasive20.la  -rpath /usr/lib/httpd/modules -module -avoid-version    mod_evasive20.lo --libexecdir=/home/madawar/webapps/qlipper/apache2/modules --prefix=/home/madawar/webapps/qlipper/apache2/lib
/var/www/build/instdso.sh SH_LIBTOOL='/var/www/build/libtool' mod_evasive20.la /usr/lib/httpd/modules
/var/www/build/libtool --mode=install cp mod_evasive20.la /usr/lib/httpd/modules/
cp .libs/mod_evasive20.so /usr/lib/httpd/modules/mod_evasive20.so
cp: cannot create regular file `/usr/lib/httpd/modules/mod_evasive20.so': Permission denied
apxs:Error: Command failed with rc=65536
(08 Sep '12, 18:19) MadawarDawar MadawarDawar's gravatar image

try setting the CPPFLAGS, LDFLAGS, and LD_LIBRARY_PATH flags in the documentation here.

(08 Sep '12, 19:41) johns ♦♦ johns's gravatar image

Try only compiling the module and not automatically install the module. Then manually copy the module to the modules directory. You should just need to remove the 'i' from the options.

(08 Sep '12, 23:13) bmeyer71 ♦♦ bmeyer71's gravatar image
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×331
×220
×52
×27
×23

question asked: 08 Sep '12, 17:32

question was seen: 3,263 times

last updated: 08 Sep '12, 23:15

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2016 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM