Created
November 15, 2015 07:16
-
-
Save magusverma/9fd3d31e0787e4bd1fa8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Step 0 | |
--------- | |
sudo apt-get install apache2 | |
Step 1 | |
--------- | |
gem install passenger | |
(add sudo if needed) | |
Step 2 | |
-------- | |
sudo apt-get install libcurl4-openssl-dev apache2-threaded-dev libapr1-dev libaprutil1-dev | |
Step 3 | |
---------- | |
passenger-install-apache2-module | |
> Select just Ruby | |
> Enter | |
> Wait for make and stuff | |
> Copy 3-4 lines generated and paste them at the end of | |
/etc/apache2/apache2.conf | |
Step 4 | |
--------- | |
create a new file myproject.com.conf in /etc/apache2/sites-available/ , with content as: | |
<VirtualHost *:80> | |
ServerName myproject.com | |
# !!! Be sure to point DocumentRoot to 'public'! | |
DocumentRoot "/home/magus/repos/myproject/public" | |
RailsEnv development | |
<Directory /home/magus/repos/myproject/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 | |
</Directory> | |
</VirtualHost> | |
----- | |
> ensure ServerName link and filename.conf matches | |
> change DocumentRoot "/home/magus/repos/myproject/public" | |
and <Directory /home/magus/repos/myproject/public> | |
to corresponding paths in system | |
Step 5 | |
-------- | |
Add or modify following line in hosts file (replace localhost with myproject.com): | |
127.0.0.1 myproject.com | |
Step 6 | |
--------- | |
Run Following Commands: | |
> sudo a2ensite myproject.com | |
> service apache2 reload | |
> sudo service apache2 restart | |
> /etc/init.d/apache2 restart | |
Step 7 | |
--------- | |
Open myproject.com in browser |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment