Skip to content

Instantly share code, notes, and snippets.

@camwest
Created March 7, 2010 16:01
Show Gist options
  • Select an option

  • Save camwest/324436 to your computer and use it in GitHub Desktop.

Select an option

Save camwest/324436 to your computer and use it in GitHub Desktop.
Edit the file /var/www/vhosts/:virtual_host/conf/httpd.include
Replace #{server_ip}, :domain_name, :virtual_host, :application, #{application_port} with your own details.
---
<VirtualHost #{server_ip}:80>
ServerName :domain_name:80
ServerAlias *.:domain_name
DocumentRoot /var/www/vhosts/:virtual_host/:application/public
<Directory /var/www/vhosts/:virtual_host/:application/public>
AllowOverride FileInfo Indexes
</Directory>
RewriteEngine On
# redirect all non-static requests to node
RewriteCond %{DOCUMENT_ROOT}/${REQUEST_FILENAME} !-f
RewriteRule ^/(.*)$ http://#{server_ip}:#{application_port}%{REQUEST_URI} [P,QSA,L]
</VirtualHost>
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment