# Compiling Apache from Source and Phusion Passenger can't find it

**URL:** <https://www.ruby-forum.com/t/compiling-apache-from-source-and-phusion-passenger-cant-find-it/226843>\
**Category:** Deployment\
**Created:** [February 22, 2013, 10:36pm UTC](https://www.ruby-forum.com/t/compiling-apache-from-source-and-phusion-passenger-cant-find-it/226843 "2013-02-22T22:36:19Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![gabe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gabe](https://www.ruby-forum.com/u/gabe)\
**Post date:** [February 22, 2013, 10:36pm UTC](https://www.ruby-forum.com/t/compiling-apache-from-source-and-phusion-passenger-cant-find-it/226843/1 "2013-02-22T22:36:19Z")

</div>

I compiled my http server (obviously from source)and runs ok under  
/usr/local/apache2 but when I do “sudo gem install passenger” it tells  
me it cannot find my apache2, the headers and the Environment and it  
suggests me to install with apt-get on debian 6.

ruby 1.9.3 also install from source code. rails is also installed  
already.  
not using RVM.

so appreciate your answers.

---

<div class="post-metadata">

**Author:** ![gabe](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/5daacb/32.png) [@gabe](https://www.ruby-forum.com/u/gabe)\
**Post date:** [February 23, 2013, 6:59pm UTC](https://www.ruby-forum.com/t/compiling-apache-from-source-and-phusion-passenger-cant-find-it/226843/2 "2013-02-23T18:59:57Z")

</div>

I found the solution here:

[http://code.google.com/p/phusion-passenger/issues/detail?id=686](http://code.google.com/p/phusion-passenger/issues/detail?id=686)

all I needed was:

export HTTPD=“/usr/local/apache2/bin/httpd”  
export BINDIR=“/usr/local/apache2”  
export APXS2=“/usr/local/apache2/bin/apxs”  
export APR\_CONFIG=“/usr/local/apr/bin/apr-1-config”  
export APU\_CONFIG=“/usr/local/apr/bin/apu-1-config”

every thing else was self-explanatory after this.  
thanks
