Thanks! Fixed. Always hard to ferret out all the typos in a piece with this many code snippets and extra formatting bits.[url=http://meincmagazine.com/civis/viewtopic.php?p=24813447#p24813447:zqimzh5l said:autodefenestrator[/url]":zqimzh5l]One thing I found: Etherpad's use of port 9001 appears to conflict with Tor.
Also, the rewrite line needs a space between "rewrite" and "^".
[url=http://meincmagazine.com/civis/viewtopic.php?p=25044279#p25044279:2as0tpk9 said:Collie147[/url]":2as0tpk9]change it to
"location ~* /wiki/\*.(js|css|png|jpg|jpeg|gif|ico)$" and it seems to have worked.
server {
listen 80 default_server;
listen [::]:80 ipv6only=on default_server;
root /usr/share/nginx/html;
index index.html index.htm index.php;
# Make site accessible from http://localhost/
server_name mywebsitehere;
include site-configs/wordpress.conf;
include site-configs/vanilla.conf;
include site-configs/wiki.conf;
location / {
try_files $uri $uri/ =404;
}
location ~ /\. { access_log off; log_not_found off; deny all; }
location ~ ~$ { access_log off; log_not_found off; deny all; }
location ^~ /sqlbuddy/ {
rewrite ^ https://$server_name$request_uri? permanent;
}
location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
}
location ~ /blog/.*\.php$ {
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location /vanilla/ {
try_files $uri $uri/ @forum;
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
}
location ~ /vanilla/.*\.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location @forum {
rewrite ^/vanilla/(.+)$ /vanilla/index.php?p=$1 last;
}
location ~ /wiki/.*\.php5?$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location /etherpad {
rewrite ^(.*) https://$server_name$1 permanent;
}
}
server {
listen 443 ssl;
root /usr/share/nginx/html;
index index.html index.htm index.php;
server_name mywebsitehere;
ssl on;
ssl_certificate /etc/nginx/ssl/ssl-unified.crt;
ssl_certificate_key /etc/nginx/ssl/ssl.key;
ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2;
ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM;
ssl_prefer_server_ciphers on;
ssl_ecdh_curve secp521r1;
include site-configs/wordpress.conf;
include site-configs/vanilla.conf;
include site-configs/wiki.conf;
location ~ /sqlbuddy/.*\.php$ {
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location /blog/ {
try_files $uri $uri/ /blog/index.php?$args;
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
}
location ~ /blog/.*.php$ {
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location /vanilla/ {
try_files $uri $uri/ @forum;
# allow 192.168.1.1;
# allow 127.0.0.1;
# deny all;
}
location ~ /vanilla/.*\.php$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location @forum {
rewrite ^/vanilla/(.+)$ /vanilla/index.php?p=$1 last;
}
location ~ /wiki/.*\.php5?$ {
try_files $uri =404;
include fastcgi_params;
fastcgi_pass php5-fpm-sock;
fastcgi_param HTTPS on;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
fastcgi_intercept_errors on;
}
location /etherpad {
proxy_pass https://localhost:9001/;
proxy_set_header Host $host;
proxy_buffering off;
}
}
description "etherpad-lite"
start on started networking
stop on runlevel [!2345]
env EPHOME=/usr/share/nginx/etherpad-lite
env EPLOGS=/var/log/etherpad-lite
env EPUSER=etherpadlite
respawn
pre-start script
chdir $EPHOME
mkdir $EPLOGS ||true
chown $EPUSER:admin $EPLOGS ||true
chmod 0755 $EPLOGS ||true
chown -R $EPUSER:admin $EPHOME/var ||true
$EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; }
end script
script
cd $EPHOME/
exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \
>> $EPLOGS/access.log \
2>> $EPLOGS/error.log
end script
/*
This file must be valid JSON. But comments are allowed
Please edit settings.json, not settings.json.template
*/
{
// Name your instance!
"title": "PlayRPG Etherpad",
// favicon default name
// alternatively, set up a fully specified Url to your own favicon
"favicon": "favicon.ico",
//IP and port which etherpad should bind at
"ip": "0.0.0.0",
"port" : 9001,
// Session Key, used for reconnecting user sessions
// Set this to a secure string at least 10 characters long. Do not share this value.
"sessionKey" : "",
/*
// Node native SSL support
// this is disabled by default
//
// make sure to have the minimum and correct file access permissions set
// so that the Etherpad server can access them
"ssl" : {
"key" : "/path-to-your/epl-server.key",
"cert" : "/path-to-your/epl-server.crt"
},
*/
//The Type of the database. You can choose between dirty, postgres, sqlite and mysql
//You shouldn't use "dirty" for for anything else than testing or development
// "dbType" : "dirty",
//the database specific settings
// "dbSettings" : {
// "filename" : "var/dirty.db"
// },
// An Example of MySQL Configuration
"dbType" : "redis",
"dbSettings" : {
"host" : "localhost",
"port" : 6379,
"database" : 0
},
//the default text of a pad
"defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http:\/\/etherpad.org\n",
/* Users must have a session to access pads. This effectively allows only group pads to be accessed. */
"requireSession" : false,
/* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. */
"editOnly" : false,
/* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly,
but makes it impossible to debug the javascript/css */
"minify" : true,
/* How long may clients use served javascript code (in seconds)? Without versioning this
may cause problems during deployment. Set to 0 to disable caching */
"maxAge" : 21600, // 60 * 60 * 6 = 6 hours
/* This is the path to the Abiword executable. Setting it to null, disables abiword.
Abiword is needed to advanced import/export features of pads*/
"abiword" : null,
/* This setting is used if you require authentication of all users.
Note: /admin always requires authentication. */
"requireAuthentication": false,
/* Require authorization by a module, or a user with is_admin set, see below. */
"requireAuthorization": false,
/*when you use NginX or another proxy/ load-balancer set this to true*/
"trustProxy": false,
/* Privacy: disable IP logging */
"disableIPlogging": false,
/* Users for basic authentication. is_admin = true gives access to /admin.
If you do not uncomment this, /admin will not be available! */
/*
"users": {
"admin": {
"password": "changeme1",
"is_admin": true
},
"user": {
"password": "changeme1",
"is_admin": false
}
},
*/
// restrict socket.io transport methods
"socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"],
/* The toolbar buttons configuration.
"toolbar": {
"left": [
["bold", "italic", "underline", "strikethrough"],
["orderedlist", "unorderedlist", "indent", "outdent"],
["undo", "redo"],
["clearauthorship"]
],
"right": [
["importexport", "timeslider", "savedrevision"],
["settings", "embed"],
["showusers"]
]
},
*/
/* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */
"loglevel": "INFO",
//Logging configuration. See log4js documentation for further information
// https://github.com/nomiddlename/log4js-node
// You can add as many appenders as you want here:
"logconfig" :
{ "appenders": [
{ "type": "console"
//, "category": "access"// only logs pad access
}
/*
, { "type": "file"
, "filename": "your-log-file-here.log"
, "maxLogSize": 1024
, "backups": 3 // how many log files there're gonna be at max
//, "category": "test" // only log a specific category
}*/
/*
, { "type": "logLevelFilter"
, "level": "warn" // filters out all log messages that have a lower level than "error"
, "appender":
{ Use whatever appender you want here }
}*/
/*
, { "type": "logLevelFilter"
, "level": "error" // filters out all log messages that have a lower level than "error"
, "appender":
{ "type": "smtp"
, "subject": "An error occured in your EPL instance!"
, "recipients": "bar@blurdybloop.com, baz@blurdybloop.com"
, "sendInterval": 60*5 // in secs -- will buffer log messages; set to 0 to send a mail for every message
, "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods
"host": "smtp.example.com", "port": 465,
"secureConnection": true,
"auth": {
"user": "foo@example.com",
"pass": "bar_foo"
}
}
}
}*/
]
}
}
[url=http://meincmagazine.com/civis/viewtopic.php?p=25678777#p25678777:3echpjm3 said:acorbo[/url]":3echpjm3][url=http://meincmagazine.com/civis/viewtopic.php?p=25044279#p25044279:3echpjm3 said:Collie147[/url]":3echpjm3]change it to
"location ~* /wiki/\*.(js|css|png|jpg|jpeg|gif|ico)$" and it seems to have worked.
I had the exact same behavior on my installation. I tried your changes and it appears to be working now. Still, I'm at a loss on 'why' would a wiki location have any effect on the pad's css... Let me know the reason if you have the time, and thanks a million for posting it...
[url=http://meincmagazine.com/civis/viewtopic.php?p=26508769#p26508769:of0fca2l said:Zach1812[/url]"f0fca2l]Hello all,
I am again having a weird issue that pops up a 502 Bad Gateway when trying to access and run etherpad. Fortunately for me it's only affected etherpad and not the entire site this time. Here's a run of my /etc/nginx/sites-available/www file
Code:server { listen 80 default_server; listen [::]:80 ipv6only=on default_server; root /usr/share/nginx/html; index index.html index.htm index.php; # Make site accessible from http://localhost/ server_name mywebsitehere; include site-configs/wordpress.conf; include site-configs/vanilla.conf; include site-configs/wiki.conf; location / { try_files $uri $uri/ =404; } location ~ /\. { access_log off; log_not_found off; deny all; } location ~ ~$ { access_log off; log_not_found off; deny all; } location ^~ /sqlbuddy/ { rewrite ^ https://$server_name$request_uri? permanent; } location /blog/ { try_files $uri $uri/ /blog/index.php?$args; # allow 192.168.1.1; # allow 127.0.0.1; # deny all; } location ~ /blog/.*\.php$ { # allow 192.168.1.1; # allow 127.0.0.1; # deny all; try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location /vanilla/ { try_files $uri $uri/ @forum; # allow 192.168.1.1; # allow 127.0.0.1; # deny all; } location ~ /vanilla/.*\.php$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location @forum { rewrite ^/vanilla/(.+)$ /vanilla/index.php?p=$1 last; } location ~ /wiki/.*\.php5?$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location /etherpad { rewrite ^(.*) https://$server_name$1 permanent; } } server { listen 443 ssl; root /usr/share/nginx/html; index index.html index.htm index.php; server_name mywebsitehere; ssl on; ssl_certificate /etc/nginx/ssl/ssl-unified.crt; ssl_certificate_key /etc/nginx/ssl/ssl.key; ssl_protocols SSLv3 TLSv1 TLSv1.1 TLSv1.2; ssl_ciphers ECDHE-RSA-AES256-SHA384:AES256-SHA256:RC4:HIGH:!MD5:!aNULL:!EDH:!AESGCM; ssl_prefer_server_ciphers on; ssl_ecdh_curve secp521r1; include site-configs/wordpress.conf; include site-configs/vanilla.conf; include site-configs/wiki.conf; location ~ /sqlbuddy/.*\.php$ { # allow 192.168.1.1; # allow 127.0.0.1; # deny all; try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location /blog/ { try_files $uri $uri/ /blog/index.php?$args; # allow 192.168.1.1; # allow 127.0.0.1; # deny all; } location ~ /blog/.*.php$ { # allow 192.168.1.1; # allow 127.0.0.1; # deny all; try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location /vanilla/ { try_files $uri $uri/ @forum; # allow 192.168.1.1; # allow 127.0.0.1; # deny all; } location ~ /vanilla/.*\.php$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_split_path_info ^(.+\.php)(.*)$; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location @forum { rewrite ^/vanilla/(.+)$ /vanilla/index.php?p=$1 last; } location ~ /wiki/.*\.php5?$ { try_files $uri =404; include fastcgi_params; fastcgi_pass php5-fpm-sock; fastcgi_param HTTPS on; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; fastcgi_intercept_errors on; } location /etherpad { proxy_pass https://localhost:9001/; proxy_set_header Host $host; proxy_buffering off; } }
Here is my code for /etc/init/etherpad-lite.conf
Code:description "etherpad-lite" start on started networking stop on runlevel [!2345] env EPHOME=/usr/share/nginx/etherpad-lite env EPLOGS=/var/log/etherpad-lite env EPUSER=etherpadlite respawn pre-start script chdir $EPHOME mkdir $EPLOGS ||true chown $EPUSER:admin $EPLOGS ||true chmod 0755 $EPLOGS ||true chown -R $EPUSER:admin $EPHOME/var ||true $EPHOME/bin/installDeps.sh >> $EPLOGS/error.log || { stop; exit 1; } end script script cd $EPHOME/ exec su -s /bin/sh -c 'exec "$0" "$@"' $EPUSER -- node node_modules/ep_etherpad-lite/node/server.js \ >> $EPLOGS/access.log \ 2>> $EPLOGS/error.log end script
Finally, here is my /usr/share/nginx/etherpad-lite/settings.json file
Code:/* This file must be valid JSON. But comments are allowed Please edit settings.json, not settings.json.template */ { // Name your instance! "title": "PlayRPG Etherpad", // favicon default name // alternatively, set up a fully specified Url to your own favicon "favicon": "favicon.ico", //IP and port which etherpad should bind at "ip": "0.0.0.0", "port" : 9001, // Session Key, used for reconnecting user sessions // Set this to a secure string at least 10 characters long. Do not share this value. "sessionKey" : "", /* // Node native SSL support // this is disabled by default // // make sure to have the minimum and correct file access permissions set // so that the Etherpad server can access them "ssl" : { "key" : "/path-to-your/epl-server.key", "cert" : "/path-to-your/epl-server.crt" }, */ //The Type of the database. You can choose between dirty, postgres, sqlite and mysql //You shouldn't use "dirty" for for anything else than testing or development // "dbType" : "dirty", //the database specific settings // "dbSettings" : { // "filename" : "var/dirty.db" // }, // An Example of MySQL Configuration "dbType" : "redis", "dbSettings" : { "host" : "localhost", "port" : 6379, "database" : 0 }, //the default text of a pad "defaultPadText" : "Welcome to Etherpad!\n\nThis pad text is synchronized as you type, so that everyone viewing this page sees the same text. This allows you to collaborate seamlessly on documents!\n\nGet involved with Etherpad at http:\/\/etherpad.org\n", /* Users must have a session to access pads. This effectively allows only group pads to be accessed. */ "requireSession" : false, /* Users may edit pads but not create new ones. Pad creation is only via the API. This applies both to group pads and regular pads. */ "editOnly" : false, /* if true, all css & js will be minified before sending to the client. This will improve the loading performance massivly, but makes it impossible to debug the javascript/css */ "minify" : true, /* How long may clients use served javascript code (in seconds)? Without versioning this may cause problems during deployment. Set to 0 to disable caching */ "maxAge" : 21600, // 60 * 60 * 6 = 6 hours /* This is the path to the Abiword executable. Setting it to null, disables abiword. Abiword is needed to advanced import/export features of pads*/ "abiword" : null, /* This setting is used if you require authentication of all users. Note: /admin always requires authentication. */ "requireAuthentication": false, /* Require authorization by a module, or a user with is_admin set, see below. */ "requireAuthorization": false, /*when you use NginX or another proxy/ load-balancer set this to true*/ "trustProxy": false, /* Privacy: disable IP logging */ "disableIPlogging": false, /* Users for basic authentication. is_admin = true gives access to /admin. If you do not uncomment this, /admin will not be available! */ /* "users": { "admin": { "password": "changeme1", "is_admin": true }, "user": { "password": "changeme1", "is_admin": false } }, */ // restrict socket.io transport methods "socketTransportProtocols" : ["xhr-polling", "jsonp-polling", "htmlfile"], /* The toolbar buttons configuration. "toolbar": { "left": [ ["bold", "italic", "underline", "strikethrough"], ["orderedlist", "unorderedlist", "indent", "outdent"], ["undo", "redo"], ["clearauthorship"] ], "right": [ ["importexport", "timeslider", "savedrevision"], ["settings", "embed"], ["showusers"] ] }, */ /* The log level we are using, can be: DEBUG, INFO, WARN, ERROR */ "loglevel": "INFO", //Logging configuration. See log4js documentation for further information // https://github.com/nomiddlename/log4js-node // You can add as many appenders as you want here: "logconfig" : { "appenders": [ { "type": "console" //, "category": "access"// only logs pad access } /* , { "type": "file" , "filename": "your-log-file-here.log" , "maxLogSize": 1024 , "backups": 3 // how many log files there're gonna be at max //, "category": "test" // only log a specific category }*/ /* , { "type": "logLevelFilter" , "level": "warn" // filters out all log messages that have a lower level than "error" , "appender": { Use whatever appender you want here } }*/ /* , { "type": "logLevelFilter" , "level": "error" // filters out all log messages that have a lower level than "error" , "appender": { "type": "smtp" , "subject": "An error occured in your EPL instance!" , "recipients": "bar@blurdybloop.com, baz@blurdybloop.com" , "sendInterval": 60*5 // in secs -- will buffer log messages; set to 0 to send a mail for every message , "transport": "SMTP", "SMTP": { // see https://github.com/andris9/Nodemailer#possible-transport-methods "host": "smtp.example.com", "port": 465, "secureConnection": true, "auth": { "user": "foo@example.com", "pass": "bar_foo" } } } }*/ ] } }
Thanks in advance to help given!![]()