mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
DOCS Remove Lighty docs
They don't account for protected files, or clear public webroot hosting. I think this is more of a stackoverflow or forum.silverstripe.org article, not something we should pretend to have official support for (or check for completeness and secure configuration)
This commit is contained in:
parent
f676672f76
commit
1162b11b20
@ -1,82 +0,0 @@
|
||||
# Lightttpd
|
||||
|
||||
1. Lighttpd works fine so long as you provide a custom config. Add the following to lighttpd.conf **BEFORE** installing
|
||||
Silverstripe. Replace "yoursite.com" and "/home/yoursite/public/" below.
|
||||
|
||||
|
||||
$HTTP["host"] == "yoursite.com" {
|
||||
server.document-root = "/home/yoursite/public/"
|
||||
|
||||
# Disable directory listings
|
||||
dir-listing.activate = "disable"
|
||||
|
||||
# Deny access to template files
|
||||
url.access-deny += ( ".ss" )
|
||||
static-file.exclude-extensions += ( ".ss" )
|
||||
|
||||
# Deny access to vendor
|
||||
$HTTP["url"] =~ "^/vendor" {
|
||||
url.access-deny = ( "" )
|
||||
}
|
||||
|
||||
# Rewrite URLs so they are nicer
|
||||
url.rewrite-once = (
|
||||
"^/.*\.[A-Za-z0-9]+.*?$" => "$0",
|
||||
"^/(.*?)(\?|$)(.*)" => "/index.php?$3"
|
||||
)
|
||||
|
||||
# Show SilverStripe error page
|
||||
server.error-handler-404 = "/index.php"
|
||||
}
|
||||
|
||||
|
||||
Rewrite rules do not check for file existence as they do on Apache. There is a ticket about it for Lighttpd:
|
||||
[http://redmine.lighttpd.net/issues/985](http://redmine.lighttpd.net/issues/985).
|
||||
|
||||
2. Extract the SilverStripe software to your lighttpd installation, and run http://yoursite.com/install.php and the
|
||||
installation should proceed normally.
|
||||
|
||||
## Multiple installations of SilverStripe on the same host (www.yourhost.com)
|
||||
|
||||
Running multiple installations of Silverstripe on the same host is a bit more tricky, but not impossible. I would
|
||||
recommend using subdomains instead if you can, for exampe: site1.yourdomain.com and site2.yourdomain.com, it makes
|
||||
things a lot simpler, as you just use two of the above host example blocks. But if you really must run multiple copies
|
||||
of Silverstripe on the same host, you can use something like this (be warned, it's quite nasty):
|
||||
|
||||
|
||||
$HTTP["host"] == "yoursite.com" {
|
||||
url.rewrite-once = (
|
||||
"(?i)(/copy1/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
|
||||
"(?i)(/copy2/.*\.([A-Za-z0-9]+))(.*?)$" => "$0",
|
||||
"^/copy1/(.*?)(\?|$)(.*)" => "/copy1/index.php?$3",
|
||||
"^/copy2/(.*?)(\?|$)(.*)" => "/copy2/index.php?$3"
|
||||
)
|
||||
$HTTP["url"] =~ "^/copy1/" {
|
||||
server.error-handler-404 = "/copy1/index.php"
|
||||
}
|
||||
$HTTP["url"] =~ "^/copy2/" {
|
||||
server.error-handler-404 = "/copy2/index.php"
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Note: It doesn't work properly if the directory name copy1 or copy2 on your server has a dot in it, and you then open
|
||||
the image editor inside admin, I found that out the hard way when using a directory name of silverstripe-v2.2.2 after
|
||||
directly unzipping the Silverstripe tarball leaving the name as is. I haven't found a solution for that yet, but for now
|
||||
this method still works properly if you just don't use dots in the directory names.
|
||||
|
||||
## Installing lighttpd on Debian
|
||||
|
||||
* aptitude install lighttpd *(and php5-cgi, mysql-server, etc, as necessary.)*
|
||||
* if apache is already running, lighttpd can still be safely installed. It will complain it cannot start because
|
||||
port 80 is in use. After installing lighttpd, edit /etc/lighttpd/lighttpd.conf and set: "server.port = 81" for example,
|
||||
and run /etc/init.d/lighttpd restart
|
||||
* edit /etc/lighttpd/conf-available/10-fastcgi.conf and set socket to: /var/run/lighttpd/php.socket
|
||||
* enable fastcgi module with /usr/sbin/lighty-enable-mod
|
||||
* /etc/init.d/lighttpd restart
|
||||
* You should now be able to view PHP files in your now-working lighttpd server.
|
||||
* Follow the top instructions on adding the rewrite rules, and then install SilverStripe.
|
||||
|
||||
## More about lighttpd
|
||||
|
||||
Learn more about the lighttpd webserver at http://www.lighttpd.net/
|
@ -19,7 +19,6 @@ Other ways to get SilverStripe:
|
||||
To run SilverStripe on Linux/Unix, set up one of the following web servers:
|
||||
|
||||
* [Install using Apache](installation) - our preferred platform
|
||||
* [Install using Lighttpd](installation/how_to/configure_lighttpd) - fast, but a bit trickier to get going
|
||||
* [Install using Nginx](installation/how_to/configure_nginx) - Super fast at serving static files. Great for large traffic sites.
|
||||
* [Install using nginx and HHVM](installation/how_to/setup_nginx_and_hhvm) - nginx and [HHVM](http://hhvm.com/) as a faster alternative to PHP.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user