1

I have a project that was pulled from github into my /home partition, and made symbolic links to the /var partition as per convention.

How it looks :

/home/vagrant/github/whois-dreyfus --> repo of the actual project

/var/www/whois-dreyfus --> symlink i am using for Apache

I have Apache 2.2.22 and Passenger 4.0.56 installed inside a vagrant box and running on a distant server. The problem is that when accessing to it through my private network, the whole repository is displayed instead of the index. This means if say i had 192.100.93.88 point to the index page of apache, 192.100.93.88/whois-dreyfus on the other hand displays the repo and not the index page of the project.

Furthermore, i have tested this project on a local machine using Webrick so i am confident the issue is coming from the webserver.

So, how can i run my rails app ?

The issue is similar to this thread but i couldn't find any answer wich leads to my question.

Here are my config files :

/etc/apache2/apache2.conf

# Load the passenger module for Apache

   LoadModule passenger_module /opt/passenger/passenger-4.0.56/buildout/apache2$
   <IfModule mod_passenger.c>
     PassengerRoot /opt/passenger/passenger-4.0.56
     PassengerDefaultRuby /home/vagrant/.rvm/gems/ruby-2.2.0/wrappers/ruby
   </IfModule>

/etc/apache2/sites-enabled/

<VirtualHost *:80>
         DocumentRoot /home/vagrant/github/whois-dreyfus/public
         RailsBaseURI /whois-dreyfus
      <Directory /home/vagrant/github/whois-dreyfus/public>
         # This relaxes Apache security settings.
         AllowOverride all
         # MultiViews must be turned off.
         Options -MultiViews
         # Uncomment this if you're on Apache >= 2.4:
         #Require all granted

        PassengerEnabled on
        Allow from all
      </Directory>
   </VirtualHost>

/etc/hosts

192.168.100.88  app     app     whois-dreyfus

Please tell me if something remains unclear and/or needs a better explanation. Thank you.

0

My guess is that you still have the default site enabled in /etc/apache2/sites-enabled, which has a DocumentRoot of /var/www, and that's what is serving the content to you currently.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.