exponential.earth / exponential / documentation / Installation / virtual host setup
These documentation pages are no longer maintained. Please visit the new documentation site.
The following text gives an example of how you can set up a virtual host mechanism in the Apache webserver's configuration file to host an Exponential installation.
Virtual Host setup in httpd.conf:
NameVirtualHost [IP_ADDRESS] <VirtualHost [IP_ADDRESS]:[PORT]> <Directory [PATH_TO_exponential]> Options FollowSymLinks AllowOverride None </Directory> <IfModule mod_php4.c> # If you are using Apache 2, you have to use <IfModule sapi_apache2.c> # instead of <IfModule mod_php4.c>. # some parts/addons might only run with safe mode off php_admin_flag safe_mode Off # security just in case php_admin_value register_globals 0 # performance php_value magic_quotes_gpc 0 # performance php_value magic_quotes_runtime 0 #http://www.php.net/manual/en/ini.sect.language-options.php#ini.allow-call-time-pass-reference php_value allow_call_time_pass_reference 0 </IfModule> # have fallback if mod_rewrite is not existent DirectoryIndex index.php <IfModule mod_rewrite.c> RewriteEngine On # Use one of the rewrite rules below: # Exponential <= 3.3.x: # RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php # Exponential >= 3.4.x : RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages|^/packages|^/share/icons).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php </IfModule> DocumentRoot [PATH_TO_exponential] ServerName [MY_SERVER_NAME] ServerAlias [MY_SERVER_ALIAS] </VirtualHost>
Explanation:
[PATH_TO_exponential]
Path to the directory that contains Exponential.
This must be the full path, for example "/var/www/exponential-3.3-2".
[IP_ADDRESS]
The IP address of the virtual host, for example 128.39.140.28. Apache also allows the usage of a wildcard here '*'.
[PORT]
The port on which the webserver listens for incommming requests. The combination of IP and port is called socket. Apache also allows the usage of a wildcard here '*'.
[MY_SERVER_NAME]
Domain or IP name for your site, for example www.mysite.org
[MY_SERVER_ALIAS]
Additional names or IPs for your site, for example mysite.org
NameVirtualHost:
Note that the NameVirtualHost might already be defined in your default configuration, and defining a new one might therefore conflict. If you get error messages such as "NameVirtualHost [IP_ADDRESS] has no VirtualHosts" or "mixing * ports and non-* ports with a NameVirtualHost address is not supported", try skipping the NameVirtualHost line. For more info about NameVirtualHost see http://httpd.apache.org/docs/mod/core.html#namevirtualhost
Comments
Hostname Install on WHM / CPanel Server
Steve Caponetto
Tuesday 29 March 2005 8:47:14 pm
1. Log in to WHM
2. Go to DNS Functions > Park or Point a Domain
3. Select the domain you have (or want to use) exponential installed in from the list.
4. Enter admin.domain.com (or whatever) in the "Domain to park" box
5. Submit the form.
The DNS info will be set up for your subdomain.
www.domain.com will be the site and admin.domain.com will be the admin section. Works like a breeze for me.
Excluding other parts of your website.
John Dalton
Sunday 27 June 2004 3:51:58 am
The trick here is to add a Rewrite condition in front of the rule, so that the rule isn't processed for certain things.
For example, let's say you have some separate forum software and a contact database which need to run outside of Exponential. Exponential is installed in the DocumentRoot, the forum lives at http://example.com/forum and the contacts database is at http://example.com/contacts. In your virtual server config you set up aliases to their directories, then add these lines in front of the RewriteRule:
This means that the RewriteRule directive will only be processed if the requested url is not the forum or the contacts db. Anything else will go through Exponential.
I hope this saves somebody else from having to read through the Apache docs on mod_rewrite, but if you need them you can find them here: (for Apache 2)
http://httpd.apache.org/docs-2.0/mod/mod_rewrite.html
http://httpd.apache.org/docs-2.0/misc/rewriteguide.html
override php ini values in vhost
Björn Dieding@xrow.de
Wednesday 25 February 2004 9:51:42 pm
NameVirtualHost [IP_ADDRESS]
<VirtualHost [IP_ADDRESS]:[PORT]>
<Directory [PATH_TO_exponential]>
Options FollowSymLinks
AllowOverride None
</Directory>
php_admin_flag safe_mode Off
php_admin_value open_basedir none
RewriteEngine On
RewriteRule !(^/design|^/var/.*/storage|^/var/storage|^/var/.*/cache|^/var/cache|^/extension/.*/design|^/kernel/setup/packages).*\.(gif|css|jpg|png|jar|js|ico|pdf|swf)$ /index.php
DocumentRoot [PATH_TO_exponential]
ServerName [MY_SERVER_NAME]
ServerAlias [MY_SERVER_ALIAS]
</VirtualHost>
Texttoimage and /var/cache
Balazs Halasy
Thursday 19 February 2004 12:05:14 pm
Balazs
Document Root
Björn Dieding@xrow.de
Tuesday 03 February 2004 10:59:41 am
so calling /index.php will be ok just right
Added .pdf extension in the rewriterule
Vidar Langseid
Monday 02 February 2004 9:56:30 am
I therefore just added the .pdf extension to the rewriterule
Virtual host is dependend upon httpd.conf
Tore Skobba
Friday 23 January 2004 3:13:49 pm
I had problems with my vhost conf, due to that I had in my httpd.conf set a very restrictive access rules, no one could get anything:(, as such I had to open it up in my vhost.conf, i forgot it and spent some hours figuring it out. So if you are having trouble then try this:
<Directory "path to EZ">
Options FollowSymLinks ExecCGI
AllowOverride None
Order allow,deny
Allow from all
</Directory>