All pastes #922971 Raw Edit

Stuff

public text v1 · immutable
#922971 ·published 2008-02-29 03:46 UTC
rendered paste body
NameVirtualHost *:80
NameVirtualHost *:443

<VirtualHost *:80>
	ServerAdmin admin@domain.com
	ServerName dev.domain.com
	DocumentRoot /var/www/html

	<Directory /var/www/html>
	   Options -Indexes FollowSymLinks MultiViews
	   AllowOverride ALL
	   Order allow,deny
	   allow from all
	</Directory>

        <IfModule mod_rewrite.c>
           RewriteEngine On
           RewriteCond %{HTTPS} !=on
           RewriteRule ^/svn/project/(.*) https://%{SERVER_NAME}/svn/project/$1 [R,L]
           RewriteRule ^/trac/project/(.*) https://%{SERVER_NAME}/trac/project/$1 [R,L]
           RewriteRule ^/phpmyadmin/(.*) https://%{SERVER_NAME}/phpmyadmin/$1 [R,L]
        </ifModule>

        LogLevel warn
	ErrorLog /var/log/httpd/error.log
	CustomLog /var/log/httpd/access.log combined
	ServerSignature On
</VirtualHost>

<VirtualHost *:443>
	ServerAdmin admin@domain.com
	ServerName dev.domain.com
	DocumentRoot /var/www/html

	<Directory /var/www/html>
	   Options -Indexes FollowSymLinks MultiViews
	   AllowOverride ALL
	   Order allow,deny
	   allow from all
	</Directory>

        <Location /svn/project>
          DAV svn
          SVNPath /var/www/svn/project
          AuthType Basic
          AuthName "svn repo for dev.domain.com"
          AuthUserFile /var/www/.htpasswd
          Require valid-user
       </Location>

       ScriptAlias /trac/project /usr/share/trac/cgi-bin/trac.cgi
        <Directory "/usr/share/trac/cgi-bin/">
	   AllowOverride None
	   Options ExecCGI -MultiViews +SymLinksIfOwnerMatch
	   Order allow,deny
	   Allow from all
	</Directory>

       <Location "/trac/project">
          SetEnv TRAC_ENV "/var/www/trac/project"
       </Location>
       <Location "/trac/project/login">
          AuthType Basic
          AuthName "Trac Login for Project development"
          AuthUserFile /var/www/.htpasswd
          Require valid-user
       </Location>

       Alias /phpmyadmin /usr/share/phpmyadmin/
       <Location "/phpmyadmin">
          AuthType Basic
          AuthName "phpmyadmin Access Login on dev.domain.com"
          AuthUserFile /var/www/.htpasswd
          Require valid-user
       </Location>
       <Directory  /usr/share/phpmyadmin/>
          Options Indexes FollowSymLinks MultiViews
          AllowOverride all
          Order allow,deny
          allow from all
        </Directory>

        SSLEngine On
        SSLCertificateKeyFile /etc/pki/tls/private/dev.domain.com.key
        SSLCertificateFile /etc/pki/tls/certs/dev.domain.com.cert
	LogLevel warn
	ErrorLog /var/log/httpd/error.log
	CustomLog /var/log/httpd/access.log combined
	ServerSignature On
</VirtualHost>


#tail /var/log/httpd/error.log
#[Thu Feb 28 13:56:30 2008] [error] [client 77.44.33.137] File does not exist: /var/www/html/favicon.ico
#[Thu Feb 28 13:58:41 2008] [error] [client 77.44.33.137] Directory index forbidden by Options directive: /var/www/html/
#[Thu Feb 28 13:58:55 2008] [error] [client 77.44.33.137] Directory index forbidden by Options directive: /var/www/html/
#[Thu Feb 28 13:58:58 2008] [error] [client 77.44.33.137] File does not exist: /var/www/html/svn
#[Thu Feb 28 13:59:01 2008] [error] [client 77.44.33.137] File does not exist: /var/www/html/svn