The installation instruction for lampcms says "Configure your webserver to point your site's root directory to the www directory".
However, I have different directories inside /var/www corresponding to different websites. If I set:
I won't be able to access other websites.
If I don't change the setting of DocumentRoot, i.e. "DocumentRoot /var/www", when I access my lampcms site at: server_ip/lampcms/www, the site has no css style at all.
Can some one please explain me what's the correct way to configure root directory to make lampcms works?
Thanks Dmitri. I think what I must change is the sites-available/default file with the content given from RewriteRules.txt. However, I got this error when restarting apache after that:
Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration
In the RewriteRules.txt, it explains that I need to put the following lines somewhere before the rules:
RewriteCond $1 !^(index\.php|(.+)\.(css|js|png|gif|jpg|jpeg)$|robots\.txt)
RewriteRule ^(.*)$ /index.php/$1 [L]
However, I don't really understand where to put those lines? in which files?
Can you comment on that?
For multi-site you need to have directory structure similar to this:
Then copy contents of www directory from Lampcms distribution into each site's www directory
Copy contents of config into each sites's config directory. Rename !config.ini.dist to !config.ini and acl.ini.dist into acl.ini inside each sites' config directory. Edit each sites' !config.ini file to have own db connection credentials.
Inside each sites' www directory rename bootstrap.dist.php to bootstrap.php
Upload a single file lampcms.phar from the Lampcms distribution to any location on your server. Edit each bootstrap.php to point to location of lampcms.phar (read instructions on bootstrap.php for that)
Your webserver's configuration will then point to each sites' www directory as the root of that website.
Optionally create rewrite rules for each site and don't forget to edit [URI_PARTS] section - if you setup your own rewrite rules then you need to leave the value of FILE blank in the [URI_PARTS] section