diff --git a/documentation/guides/InstallationUbuntuLighttpd.markdown b/documentation/guides/InstallationUbuntuLighttpd.markdown index 72e559c7..ba9201c5 100644 --- a/documentation/guides/InstallationUbuntuLighttpd.markdown +++ b/documentation/guides/InstallationUbuntuLighttpd.markdown @@ -73,7 +73,7 @@ The `99` in the prefix of the destination filename above is so that Lighttpd loa Next open the configuration you just copied and edit it to match your site. Edit the `$HTTP["host"]` line and replace the variable contents with the subdomain where you are installing OpenPhoto. The value is a regular expression, so keep the `\.` which matches a period instead of any character as well as the `^` `$` to direct matching the beginning and end of the hostname respectively. -Now replace the path on the `server.document-root` line with the path to the `src` sub-directory where you downloaded/copied OpenPhoto. This path would be `/var/www/yourdomain.com/src` if you followed the directions in the last section exactly. +Now replace the path on the `server.document-root` line with the path to the `src/html` sub-directory where you downloaded/copied OpenPhoto. This path would be `/var/www/yourdomain.com/src/html` if you followed the directions in the last section exactly. A few modules must be enabled for use by Lighty for our OpenPhoto install. First edit `/etc/lighttpd/lighttpd.conf` and uncomment the line for `mod_rewrite` under the `server.modules` section. Next enable PHP through the FastCGI module from the command line. diff --git a/src/configs/openphoto-lighttpd.conf b/src/configs/openphoto-lighttpd.conf index 9e181839..9845867e 100644 --- a/src/configs/openphoto-lighttpd.conf +++ b/src/configs/openphoto-lighttpd.conf @@ -5,7 +5,7 @@ # NOTE: You need to set up a subdomain for openphoto # to work correctly. $HTTP["host"] =~ "^openphoto\.yourdomain\.com$" { - server.document-root = "/where/you/installed/openphoto/frontend/src" + server.document-root = "/where/you/installed/openphoto/frontend/src/html" # Deny access to config files $HTTP["url"] =~ "^/" { @@ -13,11 +13,11 @@ $HTTP["host"] =~ "^openphoto\.yourdomain\.com$" { } # Main rewrites for clean url behavior and security - url.rewrite-once += ( + url.rewrite-if-not-file += ( # Pass through necessary directories and files as is - "^/assets/(.+)$" => "/html/assets/$1", - "^/(.*)\?(.+)$" => "/html/index.php?__route__=/$1&$2", - "^/(.*)$" => "/html/index.php?__route__=/$1", - "^/$" => "/html/index.php", + "^/assets/(.+)$" => "/assets/$1", + "^/(.*)\?(.+)$" => "/index.php?__route__=/$1&$2", + "^/(.*)$" => "/index.php?__route__=/$1", + "^/$" => "/index.php", ) }