All pastes #2051187 Raw Edit

Miscellany

public text v1 · immutable
#2051187 ·published 2011-04-27 12:48 UTC
rendered paste body


  LoadModule passenger_module /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2/ext/apache2/mod_passenger.so
   PassengerRoot /usr/local/lib/ruby/gems/1.8/gems/passenger-3.0.2
   PassengerRuby /usr/local/bin/ruby
   Include mods-available/rewrite.load
   <VirtualHost *:80>
      ServerName subdom.mydomain.com
      ServerAlias *subdom.mydomain.com
      DocumentRoot /home/ubuntu/veddvelem/public
      RailsEnv staging
      <Directory /home/ubuntu/veddvelem/public>
         AllowOverride all
         Options -MultiViews
         AuthType Basic
         AuthName "Restricted Area"
      </Directory>
      <Directory /home/ubuntu/veddvelem/public/api>
        AllowOverride all
        Options -MultiViews
        Allow from all
        Satisfy Any
      </Directory>
      RewriteEngine On
      RewriteCond %{REQUEST_URI} ^/php.*
      RewriteRule ^(.*)$ $1 [L]

      #RewriteCond %{HTTP_HOST} ^subdom\.dbx\.hu
      #RewriteRule ^(.*)$ http://www.subdom.mydomain.com/$1 [R=permanent,L]

      #RewriteEngine On
      #RewriteCond %{HTTPS} on
      #RewriteRule ^(.*)$ https://www.subdom.mydomain.com/$1 [R=permanent,L]
      #RewriteRule (.*) https://www.%{HTTP_HOST}%{REQUEST_URI} 

      RewriteEngine On
      RewriteCond %{HTTP_HOST} ^www.subdom.mydomain.com
      RewriteRule (.*) http://subdom.mydomain.com$1 [L,R=301]

      RewriteEngine On
      RewriteCond %{SERVER_PORT} 80
      RewriteCond %{REQUEST_URI} ^/bejelentkezes [OR]
      #RewriteCond %{REQUEST_URI} ^/sessions/new [OR]
      #RewriteCond %{REQUEST_URI} ^/sessions/create [OR]
      RewriteCond %{REQUEST_URI} ^/sessions [OR]
      RewriteCond %{REQUEST_URI} ^/felhasznalok.*
	      #RewriteCond %{REQUEST_URI} ^/sessions.*
	      RewriteRule ^(.*)$ https://www.subdom.mydomain.com$1 [L,R]
      RewriteLog "/var/log/apache2/rewrite.log"
      RewriteLogLevel 9

   </VirtualHost>