Actions

Help

Difference between revisions of "1.4 VHost Config Change"

From OpenLiteSpeed Wiki

Line 3: Line 3:
 
== Old configuration structure ==
 
== Old configuration structure ==
  
In OpenLiteSpeed versions before 1.4, virtual host configuration files were stored by default in separated directories under <code>/usr/local/lsws/</code>. These directories were considered the virtual host root and often had a separate <code>conf/</code> directory within them.
+
In OpenLiteSpeed versions before 1.4, virtual host configuration files were commonly stored under the virtual host root.
  
Virtual host "Example", for example, has the virtual host root <code>/usr/local/lsws/Example/</code>. Example's configurations are then stored in <code>/usr/local/lsws/Example/conf/vhost.xml</code>.
+
Virtual host "Example11", for example, might have the virtual host root <code>/usr/home/user11/Example11/</code>. Example11's configurations are then stored in <code>/usr/local/lsws/Example/conf/vhost.xml</code>.
  
 
This could cause problems with the WebAdmin console if the WebAdmin user (<code>lsadm</code>) did not have access to these directories. Giving the WebAdmin console access to these directories, though, can be a security hole.
 
This could cause problems with the WebAdmin console if the WebAdmin user (<code>lsadm</code>) did not have access to these directories. Giving the WebAdmin console access to these directories, though, can be a security hole.
Line 11: Line 11:
 
== New configuration structure ==
 
== New configuration structure ==
  
To fix this, starting with OpenLiteSpeed 1.4, we have moved the default location for virtual host configuration files to directories under <code>/usr/local/lsws/conf/vhosts</code>. Non-configuration virtual host files (such as scripts and static content) are still found under the virtual host root.
+
To fix this, starting with OpenLiteSpeed 1.4, we have moved the default location for virtual host configuration files to directories under <code>/usr/local/lsws/conf/vhosts</code>. Other virtual host files (such as scripts and static content) can still be put under the virtual host root.
  
For example, the main configuration file for virtual host "Example" is now in <code>/usr/local/lsws/conf/vhosts/Example/vhost.conf</code>. Other configuration files, such as passwords, groups, and realms should also be placed here. Scripts, static content, and other files are still found in Example's virtual host root — <code>/usr/local/lsws/Example/</code>.  
+
For example, the main configuration file for virtual host "Example11" is now in <code>/usr/local/lsws/conf/vhosts/Example11/vhost.conf</code>. Other configuration files, such as passwords, groups, and realms should also be placed here. Scripts, static content, and other files are still found in Example11's virtual host root — <code>/usr/home/user11/Example11/</code>.  
  
 
We recommend that all users use this structure.
 
We recommend that all users use this structure.
Line 19: Line 19:
 
=== Upgrading from 1.3.x to 1.4.x ===
 
=== Upgrading from 1.3.x to 1.4.x ===
  
Configuration files are not moved when you upgrade from 1.3.x to 1.4.x. We recommend, though, that users move their virtual configuration files to this file layout.
+
Configuration files are not moved when you upgrade from 1.3.x to 1.4.x. We recommend, though, that users move their virtual host configuration files to this file layout.
  
 
[[Category:Help]] [[Category:Virtual Hosts]]
 
[[Category:Help]] [[Category:Virtual Hosts]]

Revision as of 20:27, 28 August 2014

OpenLiteSpeed 1.4 features a change in where virtual host configuration files are stored by default.

Old configuration structure

In OpenLiteSpeed versions before 1.4, virtual host configuration files were commonly stored under the virtual host root.

Virtual host "Example11", for example, might have the virtual host root /usr/home/user11/Example11/. Example11's configurations are then stored in /usr/local/lsws/Example/conf/vhost.xml.

This could cause problems with the WebAdmin console if the WebAdmin user (lsadm) did not have access to these directories. Giving the WebAdmin console access to these directories, though, can be a security hole.

New configuration structure

To fix this, starting with OpenLiteSpeed 1.4, we have moved the default location for virtual host configuration files to directories under /usr/local/lsws/conf/vhosts. Other virtual host files (such as scripts and static content) can still be put under the virtual host root.

For example, the main configuration file for virtual host "Example11" is now in /usr/local/lsws/conf/vhosts/Example11/vhost.conf. Other configuration files, such as passwords, groups, and realms should also be placed here. Scripts, static content, and other files are still found in Example11's virtual host root — /usr/home/user11/Example11/.

We recommend that all users use this structure.

Upgrading from 1.3.x to 1.4.x

Configuration files are not moved when you upgrade from 1.3.x to 1.4.x. We recommend, though, that users move their virtual host configuration files to this file layout.