Added example Apache and nginx config scripts and updated INSTALL doc accordingly.
This commit is contained in:
parent
3013beddbd
commit
7512ba1159
70
INSTALL
70
INSTALL
|
@ -151,8 +151,8 @@ Connect to the following URL in a web browser running on the same machine:
|
||||||
http://localhost:8081/
|
http://localhost:8081/
|
||||||
|
|
||||||
|
|
||||||
production mode
|
production mode setup
|
||||||
---------------
|
---------------------
|
||||||
|
|
||||||
Production mode is intended for a live production web site, so you can skip
|
Production mode is intended for a live production web site, so you can skip
|
||||||
this section entirely if you don't care about running such a site. Production
|
this section entirely if you don't care about running such a site. Production
|
||||||
|
@ -160,57 +160,57 @@ mode doesn't support auto-reload, and logging goes to file (luminotes.log)
|
||||||
instead of the console, but performance should be better than in development
|
instead of the console, but performance should be better than in development
|
||||||
mode.
|
mode.
|
||||||
|
|
||||||
First you'll need to configure your web server to forward requests for
|
First you'll need to configure your web server to forward requests for pages
|
||||||
non-static pages to CherryPy. These instructions are for Apache, but in
|
to Luminotes. Example configuration files are included for both Apache and
|
||||||
theory, Luminotes should work with just about any web server.
|
nginx, but in theory, Luminotes should work with just about any web server.
|
||||||
|
|
||||||
In your Apache configuration file, enable mod_rewrite and mod_proxy, then add
|
For Apache, enable mod_rewrite and mod_proxy, and then configure a VirtualHost
|
||||||
the following rewrite rules to the settings for your VirtualHost:
|
as per the example configuration file in examples/apache_luminotes.
|
||||||
|
|
||||||
RewriteEngine on
|
For nginx, if you want a working upload progress bar, build and install a
|
||||||
RewriteRule ^/favicon.ico /path/to/luminotes/static/images/favicon.ico [L]
|
version of nginx with the NginxHttpUploadProgressModule enabled. See:
|
||||||
RewriteRule ^/robots.txt /path/to/luminotes/static/html/robots.txt [L]
|
http://wiki.nginx.org//NginxHttpUploadProgressModule for more information.
|
||||||
RewriteRule ^/static/(.*) /path/to/luminotes/static/$1 [L]
|
Then, configure nginx as per the example configuration file in
|
||||||
RewriteRule ^(.*) http://127.0.0.1:8081$1 [P]
|
examples/nginx_luminotes.
|
||||||
|
|
||||||
You should change the paths in the rules above to point to wherever Luminotes
|
For either web server, you should change the paths in your configuration file
|
||||||
happens to be installed. These rules cause Apache to serve static files
|
to point to wherever Luminotes happens to be installed. The example
|
||||||
itself, while passing through requests for dynamic pages to the CherryPy web
|
configuration causes your web server to serve static files itself, while
|
||||||
server running locally.
|
passing through requests for dynamic pages to the Luminotes web server running
|
||||||
|
locally.
|
||||||
|
|
||||||
Optionally, you can also enable Apache's mod_expires module and include the
|
|
||||||
following configuration along with the above rules:
|
|
||||||
|
|
||||||
ExpiresActive On
|
SSL support
|
||||||
ExpiresDefault "A600"
|
-----------
|
||||||
|
|
||||||
This will tell clients not to request static pages more frequently than every
|
If you want to use SSL, procure and install an SSL cert for use with your web
|
||||||
ten minutes (unless the user forces a reload).
|
server. Duplicate the standard non-SSL web server configuration for a separate
|
||||||
|
SSL-enabled VirtualHost or server section, but change the IP address from
|
||||||
If you want to use SSL, procure and install an SSL cert for use with Apache.
|
127.0.0.1 to 127.0.0.2 for SSL. This hack allows the Luminotes server to
|
||||||
Add the above mod_rewrite rules to the settings for your SSL-enabled
|
distinguish between SSL and non-SSL requests by looking at the proxy IP.
|
||||||
VirtualHost, but change the IP in the last rule from 127.0.0.1 to 127.0.0.2.
|
Without this, Luminotes would have no way of knowing whether a particular
|
||||||
This hack allows the Luminotes server to distinguish between SSL and non-SSL
|
request was encrypted when received by your web server. (There are ways to do
|
||||||
requests by looking at the proxy IP. Without this, Luminotes would have no way
|
this in a less hacky manner, which might be supported in the future.)
|
||||||
of knowing whether a particular request was encrypted when received by Apache.
|
|
||||||
(There are ways to do this in a less hacky manner with Apache 2, but not
|
|
||||||
Apache 1.)
|
|
||||||
|
|
||||||
To configure the Luminotes server for SSL support, edit config/Common.py and
|
To configure the Luminotes server for SSL support, edit config/Common.py and
|
||||||
change the values of luminotes.http_url and luminotes.https_url based on the
|
change the values of luminotes.http_url and luminotes.https_url based on the
|
||||||
domain you're using. For instance:
|
domain you're using. For instance:
|
||||||
|
|
||||||
"luminotes.http_url": "http://luminotes.com",
|
"luminotes.http_url": "http://yourhostname.com",
|
||||||
"luminotes.https_url": "https://luminotes.com",
|
"luminotes.https_url": "https://yourhostname.com",
|
||||||
|
|
||||||
|
|
||||||
|
starting production mode
|
||||||
|
------------------------
|
||||||
|
|
||||||
Then to actually start the production mode server, run:
|
Then to actually start the production mode server, run:
|
||||||
|
|
||||||
python luminotes.py
|
python luminotes.py
|
||||||
|
|
||||||
You should be able to connect to the site at whatever domain you've configured
|
You should be able to connect to the site at whatever domain you've configured
|
||||||
Apache to serve.
|
Apache or nginx to serve.
|
||||||
|
|
||||||
Optionally, you can copy tools/luminotes_debian_initscript to
|
Optionally, you can copy examples/luminotes_debian_initscript to
|
||||||
/etc/init.d/luminotes and use the following command to start the Luminotes
|
/etc/init.d/luminotes and use the following command to start the Luminotes
|
||||||
server instead:
|
server instead:
|
||||||
|
|
||||||
|
|
6
NEWS
6
NEWS
|
@ -1,7 +1,9 @@
|
||||||
1.6.10:
|
1.6.10:
|
||||||
* For those of you who have installed Luminotes Server: Fixed a bug in
|
* For those of you who have installed Luminotes Server: Fixed a bug in
|
||||||
tools/luminotes_debian_initscript that prevented the "stop" command from
|
examples/luminotes_debian_initscript that prevented the "stop" command
|
||||||
working properly.
|
from working properly.
|
||||||
|
* Also for Luminotes Server users: Added support for using the nginx web
|
||||||
|
server with Luminotes, specifically for fast uploads and downloads.
|
||||||
|
|
||||||
1.6.9: March 16, 2009
|
1.6.9: March 16, 2009
|
||||||
* Added a remove formatting feature to the tools menu. This allows you to
|
* Added a remove formatting feature to the tools menu. This allows you to
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
<VirtualHost *>
|
||||||
|
ServerName yourhostname.com
|
||||||
|
CustomLog /var/log/apache/luminotes.access.log combined
|
||||||
|
ErrorLog /var/log/apache/luminotes.error.log
|
||||||
|
|
||||||
|
ErrorDocument 502 /static/html/reload.html
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteRule ^/favicon.ico /path/to/luminotes/static/images/favicon.ico [L]
|
||||||
|
RewriteRule ^/notebooks/favicon.ico /path/to/luminotes/static/images/favicon.ico [L]
|
||||||
|
RewriteRule ^/robots.txt /path/to/luminotes/static/html/robots.txt [L]
|
||||||
|
RewriteRule ^/static/(.*) /path/to/luminotes/static/$1 [L]
|
||||||
|
RewriteRule ^(.*) http://127.0.0.1:8081$1 [P]
|
||||||
|
</VirtualHost>
|
||||||
|
|
|
@ -0,0 +1,46 @@
|
||||||
|
gzip_comp_level 4;
|
||||||
|
gzip_min_length 1100;
|
||||||
|
gzip_types text/plain text/html text/css application/x-javascript;
|
||||||
|
|
||||||
|
upstream luminotes {
|
||||||
|
server 127.0.0.1:8081;
|
||||||
|
}
|
||||||
|
|
||||||
|
server {
|
||||||
|
listen 80;
|
||||||
|
server_name yourhostname.com;
|
||||||
|
|
||||||
|
access_log /var/log/nginx/luminotes.access.log;
|
||||||
|
|
||||||
|
location / {
|
||||||
|
proxy_pass http://luminotes;
|
||||||
|
client_max_body_size 505m;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /download/ {
|
||||||
|
internal;
|
||||||
|
alias /path/to/luminotes_user/.luminotes/files/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /download_product/ {
|
||||||
|
internal;
|
||||||
|
alias /path/to/luminotes/products/;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /favicon.ico {
|
||||||
|
root /path/to/luminotes/static/images;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /robots.txt {
|
||||||
|
root /path/to/luminotes/static/html;
|
||||||
|
}
|
||||||
|
|
||||||
|
location /static/ {
|
||||||
|
root /path/to/luminotes;
|
||||||
|
}
|
||||||
|
|
||||||
|
error_page 500 502 503 504 /reload.html;
|
||||||
|
location = /reload.html {
|
||||||
|
root /path/to/luminotes/static/html;
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue