How do I get my actual rails website to run instead of the index / of directory listing?

January 28, 2014 3.7k views
I been working on this problem for a while and so far haven't been able to solve this. Everything appears to have installed correctly and I double checked everything. Even going so far as to create a detailed Rails deployment plan. So far everything has installed successfully but I can't seem to get my rails website to actually do what it is supposed to do. Any help would be greatly appreciated. I really want this website to work so badly and it is frustrating to me that the deployment process is hitting a wall. I might be missing something but I believe this is a complete list of tasks that I ran. This is my website that should be displaying the homepage with a bat on it but isn't Here are the tasks I ran to get rails ready. PS: yes Rails is installed. Step 1 Rails ready wget --no-check-certificate && bash RVM install(option 2) Step 2 Install Ruby rvm install 1.9.3 rvm use --default 1.9.3 Step 3 Install Rails gem install rails -v=3.2.14 Step 4 Install git apt-get install git Step 5 Install Rails/Ruby Packages apt-get install nodejs gem install execjs Step 6 Install prequisites for passenger apt-get install libcurl4-openssl-dev apt-get install apache2-threaded-dev Steps 7 setup passenger gem install passenger apt-get install libapache2-mod-passenger passenger-install-apache2-module Step 8 expand swap space sudo dd if=/dev/zero of=/swap bs=1M count=1024 sudo mkswap /swap sudo swapon /swap Step 9 rerun passenger install command passenger-install-apache2-module Step 10 Apache config sudo nano /etc/apache2/apache2.conf LoadModule passenger_module /home/username/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12/ext/apache2/ PassengerRoot /home/username/.rvm/gems/ruby-1.9.3-p194/gems/passenger-3.0.12 PassengerRuby /home/username/.rvm/wrappers/ruby-1.9.3-p194/ruby Step 11 Restart Apache sudo service apache2 restart --Fails here--- Step 12 Create enable site cd /etc/apache2/sites-enabled/ cp 000-default sudo nano PassengerRuby /usr/local/rvm/wrappers/ruby-1.9.3-p484/ruby ServerAdmin ServerName DocumentRoot /var/www/ AllowOverride None Options -MultiViews Step 13 Restart Apache again sudo service apache2 restart ---------Fails again---- Step 14 Removed default ruby from config mkdir /var/www/ LoadModule passenger_module /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-$ PassengerRoot /usr/local/rvm/gems/ruby-1.9.3-p484/gems/passenger-4.0.36 # PassengerDefaultRuby /usr/local/rvm/wrappers/ruby-1.9.3-p484/ruby Step 15 Restart apache again sudo service apache2 restart Step 16 Configure sites-available for cp /etc/apache2/sites-available/default /etc/apache2/sites-available/ cd /etc/apache2/sites-available/ nano ServerAdmin ServerName ServerAlias DocumentRoot /var/www/ or ServerName # !!! Be sure to point DocumentRoot to 'public'! DocumentRoot /somewhere/public # This relaxes Apache security settings. AllowOverride all # MultiViews must be turned off. Options -MultiViews Step 17 Restart Apache sudo service apache2 restart Step 18 Enable site sudo a2ensite your_app_name sudo a2ensite ----Fails---- Step 19 Remove file from site-enabled cd /etc/apache2/sites-enabled rm Step 20 Enable site trial 2 sudo a2ensite Step 21 Reload Apache service apache2 reload Step 22 Turn on passenger sudo a2enmod passenger Step 23 Reload Apache 2 service apache2 reload
1 Answer
What's the output of
ls /etc/apache2/sites-enabled
? You might want to replace ServerAlias with ServerAlias
Have another answer? Share your knowledge.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!