Installation/Special Instructions/LiteSpeed
From Habari Project
Contents |
LiteSpeed
Configure PHP
Compile PDO Extensions
Using LiteSpeed's inbuilt compiler these options work for MySQL. For sqlite you'll need to ensure you have sqlite installed on the system and use appropriate configure options.
--with-mysql=/usr --with-mysql-sock=/var/run/mysqld/mysqld.sock --with-zlib --with-gd --enable-shmop --enable-track-vars --enable-sockets --enable-sysvsem --enable-sysvshm --enable-magic-quotes --enable-mbstring --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared --with-pdo-mysql=shared --with-config-file-path=../php
Load PDO Extensions
As we specified the location of the php config file in the configure line above to be ../php, this should map to /opt/lsws/php/php.ini. Open that file and make sure the following is present
;extension_dir = ./ extension=pdo.so extension=pdo_mysql.so
PHP will then use the extension_dir that is compiled into it.
To verify all is well create a new file info.php and inside put
<?php phpinfo() ?>
When you view this you should see the PDO extension and drivers enabled.
Configure Virtual Host
It's a lot simpler to deal with LiteSpeed as LiteSpeed rather using all your Apache knowledge and treat LSWS like Apache. So don't use .htaccess just setup rewrite rules in the Virtual Host config.
Do everything you normally do for a php webapp. The part you need to take note of is the Rewrite tab. Ensure Rewrite is enabled and that these rules are present.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteBase /
RewriteRule . index.php [PT]
Update RewriteBase to where you have Habri installed. I've setup on the root dir.
Restart LiteSpeed and you should be good to install.
