diff --git a/docs/INSTALL-ubuntu.md b/docs/INSTALL-ubuntu.md index 7d3d2a2c42e..16c462fb115 100644 --- a/docs/INSTALL-ubuntu.md +++ b/docs/INSTALL-ubuntu.md @@ -36,6 +36,59 @@ At Discourse, we recommend the latest version of nginx. To install on Ubuntu: # install nginx sudo apt-get update && sudo apt-get -y install nginx + +## You could use Apache2 +In the case you want Apache2 INSTEAD nginx to serve your static pages: + + # Run these commands as your normal login (e.g. "michael") + # If you don't have apache2 yet + sudo apt-get install apache2 + + # Edit your site details in a new apache2 config file + sudo vim /etc/apache2/sites-available/your-domain.com + + # Put these info inside and change accordingly + + + ServerName your-domain.com + ServerAlias www.your-domain.com + + DocumentRoot /srv/www/apps/discourse/public + + + AllowOverride all + Options -MultiViews + + + # Custom log file locations + ErrorLog /srv/www/apps/discourse/log/error.log + CustomLog /srv/www/apps/discourse/access.log combined + + + # Install the Passenger Phusion gem and run the install + gem install passenger + passenger-install-apache2-module + + # Next, we "create" a new apache2 module, passenger + sudo vim /etc/apache2/mods-available/passenger.load + + # Inside paste (change the user accodingly) + LoadModule passenger_module /home/YOUR-USER/.rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.2/libout/apache2/mod_passenger.so + + # Now the passenger module configuration + sudo vim /etc/apache2/mods-available/passenger.conf + + # Inside, paste (change the user accodingly) + PassengerRoot /home/rafael/.rvm/gems/ruby-2.0.0-p0/gems/passenger-4.0.2 + PassengerDefaultRuby /home/YOUR-USER/.rvm/wrappers/ruby-2.0.0-p0/ruby + + # Now activate them all + + sudo a2nsite your-domain.com + sudo a2enmod passenger + sudo service apache2 reload + sudo service apache2 restart + ## Install rvm and ruby environment