Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# This is a VirtualHost configuration for running Aptana Jaxer 1.0 with an
# existing installation of Apache 2.2 on Ubuntu 8.04 Server (or others.)
#
# Replace the #{...} content with the settings for your site.
# Uncomment this line if this is your only virtual host
# NameVirtualHost *
<VirtualHost *>
ServerAdmin webmaster@#{example.com}
ServerName www.#{example.com}
ServerAlias #{example.com}
# The location of your Jaxer /public directory
DocumentRoot /var/www/#{example.com}/
ServerSignature Off
# Possible values include: debug, info, notice, warn, error, crit,
# alert, emerg.
LogLevel warn
ErrorLog /var/log/apache2/#{example.com}.error.log
CustomLog /var/log/apache2/#{example.com}.access.log combined
# Disable ETags
FileETag none
# Compress and set expires headers on static content
<Location /static>
SetOutputFilter DEFLATE
# Don't compress images
SetEnvIfNoCase Request_URI \.(?:gif|jpe?g|png)$ no-gzip dont-vary
ExpiresActive On
ExpiresDefault "access plus 5 years"
</Location>
# Jaxer Configuration
LoadModule jaxer_module "/opt/AptanaJaxer/jaxer/connectors/mod_jaxer.so"
<IfModule jaxer_module>
############################################################################
# Jaxer Manager Connection settings ( see http://www.aptana.com/jaxer/connectionpool)
############################################################################
# WaitConnectionTimeOutSec 5
# MaxConnectionPoolSize 1
############################################################################
# Configures the only worker in the form of
# JaxerWorker <JaxerServerHost> <JaxerServerPort>
JaxerWorker 127.0.0.1 4327
############################################################################
# Special jaxer required paths
############################################################################
# Route all requests with jaxer-server in their path to Jaxer, in particular callbacks
<Location "/jaxer-server">
SetHandler JAXER
Order Deny,Allow
Allow from all
</Location>
############################################################################
# Special Jaxer paths
############################################################################
# Route all requests that start with jaxer-callback in their path to Jaxer as callbacks
<LocationMatch "^/jaxer-callback\b">
SetHandler JAXER
Order Deny,Allow
Allow from all
</LocationMatch>
# Route all requests with jaxer-rpc in their path to Jaxer as Remote Procedure Calls
<LocationMatch "/jaxer-rpc\b">
SetHandler JAXER
Order Deny,Allow
Allow from all
</LocationMatch>
# Route all requests with jaxer-service in their path to Jaxer as service calls
<LocationMatch "/jaxer-service\b">
SetHandler JAXER
Order Deny,Allow
Allow from all
</LocationMatch>
# Place any files that are not to be filtered through Jaxer at all
# in a folder structure that has /jaxer-bypass/ somewhere in the hierarchy above them.
<LocationMatch "/jaxer-bypass/">
# prevents processing by Jaxer before it's served back to Jaxer
JaxerPassThrough on
Order Deny,Allow
Allow from all
</LocationMatch>
# Place any files that are to be served only to Jaxer (usually to be included)
# in a folder structure that has /jaxer-include/ somewhere in the hierarchy above them.
<LocationMatch "/jaxer-include/">
# prevents processing by Jaxer before it's served back to Jaxer
JaxerPassThrough on
Order Deny,Allow
# Jaxer will fetch these files directly from the file system, not via Apache
Deny from all
</LocationMatch>
############################################################################
# Configure default content serving
############################################################################
# Configure the client framework file availablitly
<Directory "/opt/AptanaJaxer/jaxer/framework">
Deny from all
<Files clientFramework*.js>
Allow from all
</Files>
</Directory>
Alias /jaxer/framework/clientFramework_compressed.js /opt/AptanaJaxer/jaxer/framework/clientFramework_compressed.js
Alias /jaxer/framework/clientFramework.js /opt/AptanaJaxer/jaxer/framework/clientFramework.js
<Directory "/var/www/#{example.com}">
DirectoryIndex index.php index.php3 index.html index.htm index.html.var index.html.var index.html.redirect
# JaxerFilter and JaxerFilterContentType are supported in .htaccess
# when AllowOverride is at least Limit
# Filter setting for Jaxer based on url extension
# JaxerFilter <one or more extensions with or without leading dot.>
# eg: "JaxerFilter *" means jaxer will try to filter ALL requests
# Note that only requests with these extensions "might" be sent to Jaxer -- they
# are further limited based on the JaxerFilterContentType settings.
JaxerFilter html xhtml htm php
# JaxerFilterContentType <one or more content_types separated by space>
# Before the request is sent to Jaxer, its content_type.
# (resulting mime type of the document) is checked against this list.
# Only if the content_type is within the list (or == text/html), will the request be
# sent to Jaxer.
# So a request will be sent to Jaxer ONLY if it meets both the JaxerFilter and
# the JaxerFilterContentType criteria.
JaxerFilterContentType text/html
Order Deny,Allow
Allow from all
</Directory>
<Directory "/opt/AptanaJaxer/jaxer/aptana">
JaxerFilter .html .xhtml .htm .php
JaxerFilterContentType text/html
Order Deny,Allow
Deny from all
</Directory>
Alias /aptana /opt/AptanaJaxer/jaxer/aptana
</IfModule>
</VirtualHost>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment