passenger-install-apache2-module is not working in ruby 2.0.0

I'm trying to execute passenger-install-apache2-module but it is not working.

My Command Results:

$ passenger-install-apache2-module
Welcome to the Phusion Passenger Apache 2 module installer, v4.0.24.

This installer will guide you through the entire installation process. It
shouldn't take more than 3 minutes in total.

Here's what you can expect from the installation process:

 1. The Apache 2 module will be installed for you.
 2. You'll learn how to configure Apache.
 3. You'll learn how to deploy a Ruby on Rails application.

Don't worry if anything goes wrong. This installer will advise you on how to
solve any problems.

Press Enter to continue, or Ctrl-C to abort.


Checking for required software...

 * Checking for C compiler...
      Found: yes
      Location: /usr/bin/gcc
 * Checking for C++ compiler...
      Found: yes
      Location: /usr/bin/g++
 * Checking for Curl development headers with SSL support...
      Found: no
      Error: Cannot find the `curl-config` command.
 * Checking for OpenSSL development headers...
      Found: yes
      Location: /usr/include/openssl/ssl.h
 * Checking for Zlib development headers...
      Found: yes
      Location: /usr/include/zlib.h
 * Checking for Ruby development headers...
      Found: yes
      Location: /home/hemant/.rbenv/versions/2.0.0-p247/include/ruby-2.0.0/ruby.h
 * Checking for OpenSSL support for Ruby...
      Found: yes
 * Checking for RubyGems...
      Found: yes
 * Checking for Rake (associated with /home/hemant/.rbenv/versions/2.0.0-p247/bin/ruby)...
      Found: yes
      Location: /home/hemant/.rbenv/versions/2.0.0-p247/bin/ruby /home/hemant/.rbenv/versions/2.0.0-p247/bin/rake
 * Checking for rack...
      Found: yes
 * Checking for Apache 2...
      Found: no
 * Checking for Apache 2 development headers...
      Found: no
 * Checking for Apache Portable Runtime (APR) development headers...
      Found: no
 * Checking for Apache Portable Runtime Utility (APU) development headers...
      Found: no

Some required software is not installed.
But don't worry, this installer will tell you how to install them.
Press Enter to continue, or Ctrl-C to abort.


Installation instructions for required software

 * To install Curl development headers with SSL support:
   Please run apt-get install libcurl4-openssl-dev or libcurl4-gnutls-dev, whichever you prefer.

 * To install Apache 2:
   Please install it with apt-get install apache2-mpm-worker

 * To install Apache 2 development headers:
   Please install it with apt-get install apache2-threaded-dev

 * To install Apache Portable Runtime (APR) development headers:
   Please install it with apt-get install libapr1-dev

 * To install Apache Portable Runtime Utility (APU) development headers:
   Please install it with apt-get install libaprutil1-dev

If the aforementioned instructions didn't solve your problem, then please take
a look at the Users Guide:

  /home/hemant/.rbenv/versions/2.0.0-p247/lib/ruby/gems/2.0.0/gems/passenger-4.0.24/doc/Users guide Apache.html

And I tried to run apt-get install libcurl4-openssl-dev.

$ sudo apt-get install libcurl4-openssl-dev
[sudo] password for hemant: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 libcurl4-openssl-dev : Depends: libcurl3 (= 7.29.0-1ubuntu3.1) but 7.29.0-1ubuntu3.2 is to be installed
                        Depends: libldap2-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

Here's my system versions.

$ ruby -v
ruby 2.0.0p247 (2013-06-27 revision 41674) [i686-linux]
$ gem -v
rvm -v

rvm 1.23.16 (master) by Wayne E. Seguin <[email protected]>, Michal Papis <[email protected]> []

$ rails -v
Rails 4.0.1.rc4
$ bundle -v
Bundler version 1.3.5

Can anyone please help me on this matter? :(

Plus I'm having this problem! :(

$ require_relative '../spec_helper'
WARNING:root:could not open file '/etc/apt/sources.list.d/passenger.list'

require_relative: command not found

Unable to make suexec work with mod_fastcgi

I successfully managed to make mod_fastcgi work with fpm, which enables me to set the user:group running the scripts via fpm pools definition. However, there is no similar alternative for, say, a python script run through mod_fastcgi, so i'm trying to learn how to use suexec to run whatever script through mod_fastcgi with the user:group i choose.

I'm starting from this working configuration:

<VirtualHost *:80>
    DocumentRoot /var/www/test1

    LogLevel Debug
    ErrorLog /var/www/test1/error.log

    <Directory /var/www/test1/>
        Options Indexes Includes FollowSymLinks ExecCGI
        AllowOverride All
        DirectoryIndex index.php
        AddHandler php5-fastcgi .php
        Action php5-fastcgi /php5.fcgi
        Order allow,deny
        Allow from all

export PHPRC
exec /usr/bin/php5-cgi

I put a phpInfo() inside /var/www/test1/index.php, which shows the correct php.ini path.

Now, to activate suexec i:

  • Installed apache2-suexec: sudo apt-get install apache2-suexec
  • Activated mod_suexec: sudo a2enmod suexec
  • Changed files' permissions: sudo chown -R michele:michele /var/www/test1
  • Added this line to the vhost configuration: SuexecUserGroup michele michele
  • Reactivated the site and restarted apache: sudo a2dissite test1 && sudo a2ensite test1 && sudo service apache2 restart

The user:group michele:michele exists in the system. When running i see the phpInfo() output exactly as before, and echo exec('whoami'); prints www-data instead of michele.

sudo /usr/lib/apache2/suexec -V tells me that the log file should be in /var/log/apache2/suexec.log, but no such file exists. Then, i know that apache should log in the error.log file the activation of the suexec wrapper, as a notice, but in the error.log no such notice is found as well. So, i suspect that for some reason suexec isn't starting at all.

I read here the list of checks suexec does to decide if the call is successfull, but i don't know how to check what the results of these checks says they should be written in the suexec log file, but this file is never created, as it seems.

So, what i'm doing wrong?

Thank you all so much.

URL redirecting in localhost

I am using a simple htaccess file to rewrite urls of my project. I rewrite the whole url in a get variable, then use php to parse it.

My problem is when I try to send redirect headers, I can't seem to get it right.

For example, say I am viewing the page


With the header

header('Location: login');

it redirects to


When I try

 header('Location: /login');

it takes me to


which does not exist and I get a 404 error.

So far the only way I have found to work is when I do

header('Location: http://localhost/myProject/login');

but I don't think that is a good option because when my site goes live I will have to change every single header.

Is there a better way to do it?

My .htacces file is:

RewriteEngine On 
RewriteBase /myProject/

#Make sure it's not an actual file 
RewriteCond %{REQUEST_FILENAME} !-f

#Make sure its not a directory 
RewriteCond %{REQUEST_FILENAME} !-d 

#Rewrite the request to index.php 
RewriteRule ^(.*)$ index.php?get=$1 [L]

SEO friendly URLs for Magento

I am a newbie to Magento and Apache conf. I'm using Magento 1.8.0. I have configured the path so as to remove index.php from the URLs for my pages eg from




However my browser requests now direct to the index.php of my server root. I have tried adding a config section for magento as shown, but no change. What am I doing wrong?

<Directory "C:/hiddenpath/apache2/htdocs/magento">
Options All
AllowOverride All
Order allow,deny
Allow from all
Deny from none

XAMPP 1.8.2-2 Apache Web Server won’t start, always stops immediately

I'm running XAMPP 1.8.2-2 on my mac (OS X 10.9) and the Apache Web server won't start. It always get the status starting up.. or stopped. (never a green light.) I already tried to change the port to 8080 or 8888 but it still won't run.

Can someone please help me? I show some images below to give you a better view.

XAMPP apache web server won't start XAMPP apache web server starting without succes XAMPP apache web server configure port doesn't help

Thank you!

(I saw related questions but couldn't find an answer related to the mac os)