oaeproject / Hilary

Open Academic Environment (OAE) Back-End
http://www.oaeproject.org
Educational Community License v2.0
106 stars 96 forks source link

Blank admin.sakaioae.jupinno.com #841

Closed souske closed 10 years ago

souske commented 10 years ago

Hi guys, I finished set uping a sakai oae environment to admin.sakaioae.jupinno.com. but i all I can see is a blank page yet the site name ( Open Academic Environment - Administration UI) and logo was there. as i follow the thread in order to check the gui, i try to type this in my url, http://admin.sakaioae.jupinno.com/api/me and get this result; {"anon":true,"tenant":{"alias":"admin","displayName":"Global admin server"}} do you have any solution for this? together with this ticket is also a screen shot. admin sakaioae

nicolaasmatthijs commented 10 years ago

@souske : The fact that /api/me returns successfully is a sign that the back-end is working as expected. I suspect that the blank page is caused by a misconfiguration in your nginx file. Do you see any errors in your browser console? Can you paste the content of your nginx config file?

Also, the oae-dev mailing list (http://collab.sakaiproject.org/mailman/listinfo/oae-dev) would still be a better place to raise issues like these. This is a set-up/configuration issue rather than a bug.

souske commented 10 years ago

what nginx file that i need to confgure? the one inside the opt/3akai-ux/nginx/nginx.conf? or the opt/3akai-ux/target/optimized/nginx/nginx.conf?

user nginx nginx; worker_processes 5; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile 8192;

events { worker_connections 4096; }

http {

# Allows us to have "server_name" strings up to 32 characters
server_names_hash_bucket_size  64;

####################
## PROXY SETTINGS ##
####################

proxy_next_upstream error timeout http_502;
# Only give the app server 5 seconds for a request before assuming it's

down and retrying proxy_connect_timeout 5; proxy_read_timeout 5;

# Rewrite http headers to upstream servers
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Connection "";
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;

###################
## GZIP SETTINGS ##
###################

gzip on;

On Wed, Mar 12, 2014 at 5:16 PM, Nicolaas Matthijs <notifications@github.com

wrote:

@souske https://github.com/souske : The fact that /api/me returns successfully is a sign that the back-end is working as expected. I suspect that the blank page is caused by a misconfiguration in your nginx file. Do you see any errors in your browser console? Can you paste the content of your nginx config file?

Also, the oae-dev mailing list ( http://collab.sakaiproject.org/mailman/listinfo/oae-dev) would still be a better place to raise issues like these. This is a set-up/configuration issue rather than a bug.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37388225 .

nicolaasmatthijs commented 10 years ago

@souske : Please copy the full content of the nginx config file that is being used by your installation. Depending on how you configured the installation, that can be either opt/3akai-ux/nginx/nginx.conf or opt/3akai-ux/target/optimized/nginx/nginx.conf.

souske commented 10 years ago

user nginx nginx; #<%= nginxConf.NGINX_USER %> <%= nginxConf.NGINX_GROUP %>; worker_processes 5; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile 8192;

events { worker_connections 4096; }

http {

Allows us to have "server_name" strings up to 32 characters

server_names_hash_bucket_size 64;

####################

PROXY SETTINGS

####################

proxy_next_upstream error timeout http_502;

Only give the app server 5 seconds for a request before assuming it's

down and retrying proxy_connect_timeout 5; proxy_read_timeout 5;

Rewrite http headers to upstream servers

proxy_http_version 1.1; proxy_redirect off; proxy_set_header Connection ""; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true;

###################

GZIP SETTINGS

###################

gzip on; gzip_min_length 1000; gzip_http_version 1.1; gzip_comp_level 5; gzip_proxied any; gzip_types text/css text/plain text/xml application/xml application/xml+rss text/javascript application/javascript application/x-javascript application/json;

################## ##################

GLOBAL ADMIN

################## ##################

####################

LOAD BALANCING

####################

upstream globaladminworkers { server 127.0.0.1:2000;

Add extra app nodes here.

}

server { listen 80; server_name admin.sakaioae.jupinno.com;

######################

SHARED RESOURCES

######################

location /shared/ { alias /opt/3akai-ux/target/optimized/shared/; autoindex off; expires max; }

rewrite ^/favicon.ico /shared/oae/img/favicon.ico last;

#####################

ADMIN RESOURCES

#####################

location /admin/ { alias /opt/3akai-ux/target/optimized/admin/; autoindex off; expires max; }

HTML files under /admin are not hashed and should not be cached

location ~* /admin/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/admin/$1.html; expires -1; }

rewrite ^/$ /admin/index.html last; rewrite ^/tenant/(.*)$ /admin/index.html last;

#########################

APP SERVER REQUESTS

#########################

location /api/ui/skin { expires 15m; proxy_pass http://globaladminworkers; }

location /api/ui/staticbatch { expires max; proxy_pass http://globaladminworkers; }

location /api/ui/widgets { expires 15m; proxy_pass http://globaladminworkers; }

Explicitly don't cache any other API requests

location /api/ { expires -1; proxy_pass http://globaladminworkers; } }

################### ###################

TENANT SERVER

################### ###################

####################

LOAD BALANCING

####################

upstream tenantworkers { server 127.0.0.1:2001;

Add extra app nodes here.

}

server { listen 80 default_server;

######################

SHARED RESOURCES

######################

location /shared/ { alias /opt/3akai-ux/target/optimized/shared/; autoindex off; expires max; }

HTML files under /shared/oae/errors are not hashed and should not be

cached location ~* /shared/oae/errors/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/shared/oae/errors/$1.html; expires -1; }

rewrite ^/accessdenied /shared/oae/errors/accessdenied.html last; rewrite ^/maintenance /shared/oae/errors/maintenance.html last; rewrite ^/noscript /shared/oae/errors/noscript.html last; rewrite ^/notfound /shared/oae/errors/notfound.html last; rewrite ^/unavailable /shared/oae/errors/unavailable.html last;

rewrite ^/favicon.ico /shared/oae/img/favicon.ico last;

#####################

ADMIN RESOURCES

#####################

location /admin/ { alias /opt/3akai-ux/target/optimized/admin/; autoindex off; expires max; }

HTML files under /admin are not hashed and should not be cached

location ~* /admin/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/admin/$1.html; expires -1; }

rewrite ^/admin$ /admin/index.html last;

#######################

MAIN UI RESOURCES

#######################

TODO: Remove this custom landing page strategy and /custom handling when

we have configurable landing pages

location = / {

autoindex off;

expires -1;

Tell Nginx that the root is the UI directory so custom files can be

located with try_files

root <%= nginxConf.UX_HOME %>;

try_files /custom/$host/index.html /ui/index.html;

}

location /ui/ { alias /opt/3akai-ux/target/optimized/ui/; autoindex off; expires max; }

location /custom/ { alias /opt/3akai-ux/target/optimized/custom/; autoindex off; expires max; }

HTML files under /ui are not hashed and should not be cached

location ~* /ui/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/ui/$1.html; expires -1; }

rewrite ^/content /ui/content.html last; rewrite ^/discussion /ui/discussion.html last; rewrite ^/group /ui/group.html last; rewrite ^/me /ui/me.html last;

rewrite ^/$ /ui/index.html last;

rewrite ^/search /ui/search.html last; rewrite ^/user /ui/user.html last;

######################

WIDGET RESOURCES

######################

location /node_modules/ { alias /opt/3akai-ux/target/optimized/node_modules/; autoindex off; expires max; }

####################

DOCS RESOURCES

####################

location /docs/ { alias /opt/3akai-ux/target/optimized/docs/; autoindex off; }

HTML files under /docs are not hashed and should not be cached

location ~* /docs/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/docs/$1.html; expires -1; }

rewrite ^/docs$ /docs/index.html last; rewrite ^/docs/backend /docs/index.html last; rewrite ^/docs/frontend /docs/index.html last;

####################

TEST RESOURCES

####################

location /tests/ { alias /opt/3akai-ux/target/optimized/tests/; autoindex off; expires -1; }

rewrite ^/tests$ /tests/index.html last;

#################

ERROR PAGES

#################

error_page 401 /shared/oae/errors/accessdenied.html; error_page 404 /shared/oae/errors/notfound.html; error_page 502 /shared/oae/errors/unavailable.html; error_page 503 /shared/oae/errors/maintenance.html;

#########################

APP SERVER REQUESTS

#########################

location /api/auth/shibboleth/callback { expires -1; proxy_read_timeout 120; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/config { expires 15m; proxy_pass http://tenantworkers; }

location /api/content/create { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/messages { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/newversion { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/revisions/([^\/]+)/previews { expires -1; proxy_read_timeout 1200; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/discussion/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/discussion/([^\/]+)/messages { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

This can be cached indefinitely because we use signatures that change

over time to control invalidation location /api/download/signed { expires max; proxy_pass http://tenantworkers; }

location /api/group/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/group/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/ui/skin { expires 15m; proxy_pass http://tenantworkers; }

location ~* /api/group/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/ui/staticbatch { expires max; proxy_pass http://tenantworkers; }

location /api/ui/widgets { expires 15m; proxy_pass http://tenantworkers; }

location /api/user/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/user/import { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/user/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

########################

PUSH NOTIFICATIONS

########################

location /api/push/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_pass http://tenantworkers; proxy_redirect off; proxy_buffering off; proxy_read_timeout 3600; }

Explicitly don't cache any other API requests

location /api/ { expires -1; proxy_pass http://tenantworkers; }

####################

FILE DOWNLOADS

####################

Determines the maximum filesize that a user can upload.

client_max_body_size 4096M;

An internal endpoint that is used by the local file storage backend.

Change the alias so that it points to the directory that will contain the

file bodies.

This should match with the oae-content/storage/local-dir config value as

configured

in the admin UI.

location /files { internal; alias ../files; }

######################

ETHERPAD SERVERS

######################

location /etherpad/0 { expires 15m;

rewrite ^/etherpad/0(.*)$ $1 break;

proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=rAQEaT5F6&enc=AZN5HF5MRM5egQr7Q2kw4l_AuGVv_lND0kDWaZK37MIMKwjSqYwYxcMWLSaiM93V5B4vEih8-DmRUaL4-Y7fna3qzBC-q0qg4fVZOS7-cOGeER_cy_z_TrPm8QY6XZY9t38iDPnQ4MjpDLrJDlVOK-tj&s=1 ; proxy_buffering off; proxy_read_timeout 60; }

A similar configuration is used for each deployed etherpad server

location /etherpad/1 { expires 15m;

rewrite ^/etherpad/1(.*)$ $1 break;

proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=QAQFiuyW1&enc=AZPgHxPtSVIvXJkWJiXNaxxqiGVLuAPq2Qr9HZDxuPdInuYdmy--tl1RqcjM6HjjrS9pRPF-7vhF-WJplr-3_XA_6I1bZRCAtnWTWvF7wb6n85OSEiNDbZSjXX5qUe4_utwDt6AgepcpBVOhkWErY9Ax&s=1 ; proxy_buffering off; proxy_read_timeout 60; }

location /etherpad/0/socket.io/0/websocket/ { rewrite ^/etherpad/0(.*)$ $1 break;

proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=AAQEqgyCe&enc=AZOm9yg__UU_wYkI65pHUwfP6zcKAouqMfVLypfwHJu7L2nFa67GA5UG2jxSBCpdZbzp6M_mwp-VtLJ-UfZey7Xh1tnMs5lYT3m7w1WDv6Y5T5MrLn70LfLpuxXsFwJF4XKbOEhtqLRH_K05VEIeRdjx&s=1 ; proxy_buffering off; proxy_read_timeout 60; } }

include /opt/3akai-ux/nginx/mime.conf; }

nicolaasmatthijs commented 10 years ago

@souske : Before I dive into the config file, are you seeing any errors in the browser console when loading the page (or resources that can't be found)?

souske commented 10 years ago

none sir..everything is ok so far..

On Wed, Mar 12, 2014 at 7:08 PM, Nicolaas Matthijs <notifications@github.com

wrote:

@souske https://github.com/souske : Before I dive into the config file, are you seeing any errors in the browser console when loading the page (or resources that can't be found)?

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37396921 .

nicolaasmatthijs commented 10 years ago

@souske : Is the server currently down. I'm trying to go to the URL but it redirects to the unavailable page.

souske commented 10 years ago

hi nick, i left it already but ill try to check it again..i have this sample image that i saw on my screen when i start to run node app.js | node_modules/.bin/bunyan & . but as i check if the other component is is running, everything seems fine

On Wed, Mar 12, 2014 at 10:25 PM, Nicolaas Matthijs < notifications@github.com> wrote:

@souske https://github.com/souske : Is the server currently down. I'm trying to go to the URL but it redirects to the unavailable page.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37413983 .

souske commented 10 years ago

Hi Nick, I tweak some codes and the server is already running yet it is blank plage..these are the 8 print screen, just disregard the one that i sent you before..it seems there's no error upon initiating the server but still empty..

On Thu, Mar 13, 2014 at 10:35 AM, Michael Anthony Balmes < souskemickel@gmail.com> wrote:

hi nick, i left it already but ill try to check it again..i have this sample image that i saw on my screen when i start to run node app.js | node_modules/.bin/bunyan & . but as i check if the other component is is running, everything seems fine

On Wed, Mar 12, 2014 at 10:25 PM, Nicolaas Matthijs < notifications@github.com> wrote:

@souske https://github.com/souske : Is the server currently down. I'm trying to go to the URL but it redirects to the unavailable page.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37413983 .

nicolaasmatthijs commented 10 years ago

@souske : It looks like the batch request to http://admin.sakaioae.jupinno.com/api/ui/staticbatch?files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fdefault.properties&files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fen_GB.properties returns as:

{"/ui/bundles.3fee9415/default.properties":null,"/ui/bundles.3fee9415/en_GB.properties":null}

This indicates that Hilary is not able to locate the 3akai-ux files. My suspicion is that config.ui.path in Hilary's config.js file is pointing to the unoptimized 3akai-ux folder. You'll need to change that path to point to the correct target/optimized folder.

souske commented 10 years ago

hi sir,

i changed it...

/*

var bunyan = require('bunyan');

var config = module.exports.config = {};

// UI related config information. By default, we assume that the UI repostory // can be found on the same level as the Hilary folder.

/**

// Cassandra related config information. config.cassandra = { 'hosts': ['127.0.0.1:9160'], 'keyspace': 'oae', 'user': '', 'pass': '', 'timeout': 3000, 'replication': 1, 'strategyClass': 'SimpleStrategy', 'cqlVersion': '2.0.0' };

// The redis related configuration information. // The dbIndex key allows for seperation of actual and unit test data. // By default redis starts up with 16 DB indexes so there should // be no need to create one. // We'll assume that: // 0 = production // 1 = unit tests config.redis = { 'host': '127.0.0.1', 'port': 6379, 'pass': '', 'dbIndex': 0 };

/**

var tmpDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd(); tmpDir += '/oae';

/**

// The configuration that can be used to generate secure HTTP cookies. // It's strongly recommended that you change this value. // Make sure that this value is the same accross each app server. config.cookie = { 'secret': 'this secret will be used to sign your cookies, change me!' };

config.log = { 'streams': [ { 'level': 'info', 'stream': process.stdout } ], 'serializers': { 'err': bunyan.stdSerializers.err, 'req': bunyan.stdSerializers.req, 'res': bunyan.stdSerializers.res } };

/**

/**

/**

/**

/**

/**

/**

/**

/**

/**

On Thu, Mar 13, 2014 at 5:02 PM, Nicolaas Matthijs <notifications@github.com

wrote:

@souske https://github.com/souske : It looks like the batch request to http://admin.sakaioae.jupinno.com/api/ui/staticbatch?files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fdefault.properties&files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fen_GB.propertiesreturns as:

{"/ui/bundles.3fee9415/default.properties":null,"/ui/bundles.3fee9415/en_GB.properties":null}

This indicates that Hilary is not able to locate the 3akai-ux files. My suspicion is that config.ui.path in Hilary's config.js file is pointing to the unoptimized 3akai-ux folder. You'll need to change that path to point to the correct target/optimized folder.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37511731 .

souske commented 10 years ago

hi sir, I removed the trailing slashes in my nginx.conf..and the gui appears.yet the css file was not applied in my admin.sakaioae.jupinno.com..

On Thu, Mar 13, 2014 at 5:32 PM, Michael Anthony Balmes < souskemickel@gmail.com> wrote:

hi sir,

i changed it...

/*

  • Copyright 2014 Apereo Foundation (AF) Licensed under the
  • Educational Community License, Version 2.0 (the "License"); you may
  • not use this file except in compliance with the License. You may
  • obtain a copy of the License at *
  • http://opensource.org/licenses/ECL-2.0 *
  • Unless required by applicable law or agreed to in writing,
  • software distributed under the License is distributed on an "AS IS"
  • BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing
  • permissions and limitations under the License. */

var bunyan = require('bunyan');

var config = module.exports.config = {};

// UI related config information. By default, we assume that the UI repostory // can be found on the same level as the Hilary folder.

/**

  • config.ui *
  • Configuration namespace for the UI module. *
  • @param {String} path The path to the UI static assets */ config.ui = { 'path': '/opt/3akai-ux/target/optimized/' };

// Cassandra related config information. config.cassandra = { 'hosts': ['127.0.0.1:9160'], 'keyspace': 'oae', 'user': '', 'pass': '', 'timeout': 3000, 'replication': 1, 'strategyClass': 'SimpleStrategy', 'cqlVersion': '2.0.0' };

// The redis related configuration information. // The dbIndex key allows for seperation of actual and unit test data. // By default redis starts up with 16 DB indexes so there should // be no need to create one. // We'll assume that: // 0 = production // 1 = unit tests config.redis = { 'host': '127.0.0.1', 'port': 6379, 'pass': '', 'dbIndex': 0 };

/**

  • config.servers *
  • Configuration namespace for servers. *
  • @param {String} globalAdminAlias The tenant alias that will be used for the global admins
  • @param {String} globalAdminHost The hostname on which the global admin server can be reached by users
  • @param {Number} globalAdminPort The network port on which the global admin express server can run
  • @param {String} [serverInternalAddress] The internal hostname on which the server can be reached by OAE services such as the preview processor
  • @param {Number} tenantPort The network port on which the tenant express server can run
  • @param {Boolean} useHttps Whether or not the server is accessible via HTTPS. Hilary will not expose an HTTPS server, it's up to a frontend server such as Apache or Nginx to deal with the actual delivery of HTTPS traffic. This flag is mainly used to generate correct backlinks to the web application
  • @param {Boolean} [strictHttps] Whether or not the server is using a valid SSL certificate. If true, any attempts to connect to the REST endpoints using an invalid certificate should result in an error and not be ignored. If false, a valid certificate will not be required */ config.servers = { 'globalAdminAlias': 'admin', 'globalAdminHost': 'admin.sakaioae.jupinno.com', 'globalAdminPort': 2000, 'serverInternalAddress': null, 'tenantPort': 2001, 'useHttps': false, 'strictHttps': true };

var tmpDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd(); tmpDir += '/oae';

/**

  • config.files *
  • Configuration namespace for files. *
  • @param {String} tmpDir The directory where temporary files can be created. (profile pictures when cropping, ...)
  • @param {String} uploadDir The directory where upload files can be buffered before moving them over to the configured storage backend.
  • @param {Object} cleaner Holds configuration properties for the cleaning job that removes lingering files in the upload directory.
  • @param {Boolean} cleaner.enabled Whether or not the cleaning job should run.
  • @param {Number} cleaner.interval Files that haven't been accessed in this amount (of seconds) should be removed.
  • @param {String} localStorageDirectory The directory where the local storage backend can store its files. By default, the files get stored on the same level as the Hilary directory. Note: the absolute path to this directory should also be configured in the Nginx config file. This directory will not be used when Amazon S3 file storage is used.
  • @param {String} limit The maximum file upload size, accepted formats look like "5mb", "200kb", "1gb". You should also adjust your front-end proxy (e.g., Nginx, Apache) to also handle files of this size _/ config.files = { 'tmpDir': tmpDir, 'uploadDir': tmpDir + '/uploads', 'cleaner': { 'enabled': true, 'interval': 2_60*60 }, 'localStorageDirectory': '/opt/files' };

// The configuration that can be used to generate secure HTTP cookies. // It's strongly recommended that you change this value. // Make sure that this value is the same accross each app server. config.cookie = { 'secret': 'this secret will be used to sign your cookies, change me!' };

config.log = { 'streams': [ { 'level': 'info', 'stream': process.stdout } ], 'serializers': { 'err': bunyan.stdSerializers.err, 'req': bunyan.stdSerializers.req, 'res': bunyan.stdSerializers.res } };

/**

/**

/**

  • config.mq *
  • Configuration namespace for the message queue (RabbitMQ). *
  • @param {Object} connection The connection description
  • @param {String} connection.host The host for the connection
  • @param {Number} connection.port The port for the connection
  • @param {Boolean} [purgeQueuesOnStartup] If true, the application will delete all messages in a queue when a worker is first bound. This setting only takes effect if the NODE_ENV environment variable is not set to production to indicate a production environment. Default: false */ config.mq = { 'connection': { 'host': 'localhost', 'port': 5672 }, 'purgeQueuesOnStartup': false };

/**

  • config.previews *
  • Configuration namespace for the preview processor. *
  • @param {Boolean} enabled Whether or not the preview processor should be running
  • @param {String} dir A directory that can be used to store temporary files in
  • @param {Object} office Holds the configuration for anything Office related
  • @param {String} office.binary The path to the 'soffice.bin' binary that starts up Libre Office. ex: On OS X it is /Applications/LibreOffice.app/Contents/MacOS/soffice.bin with a default install
  • @param {Number} office.timeout Defines the timeout (in ms) when the Office process should be killed
  • @param {Object} pdf Holds the configuration for anything related to PDF splitting
  • @param {String} pdf.binary The path to the pdftk binary that can be used to split a PDF file into a PDF-per-page
  • @param {Number} pdf.timeout Defines the timeout (in ms) when the pdftk process should be killed
  • @param {Object} pdf2htmlEX Holds the configuration for anything related to converting a PDF file into an HTML file
  • @param {String} pdf2htmlEX.binary The path to the pdf2htmlEX binary that can be used to convert a PDF file into an HTML file
  • @param {Number} pdf2htmlEX.timeout Defines the timeout (in ms) when the pdf2htmlEX process should be killed
  • @param {Object} link Holds the configuration for anything related to link processing
  • @param {String} link.renderDelay Defines the timeout (in ms) that should be waited between loading the page and taking a screenshot
  • @param {Number} link.renderTimeout Defines the timeout (in ms) when the screencapturing should be stopped. This should include the renderDelay
  • @param {Number} link.embeddableCheckTimeout Defines the timeout (in ms) when the embeddable link check should be stopped
  • @param {Object} credentials Holds the credentials that can be used to log on the global admin server
  • @param {String} credentials.username The username to login with on the global admin server
  • @param {String} credentials.password The password to login with on the global admin server */ config.previews = { 'enabled': false, 'dir': tmpDir + '/previews', 'office': { 'binary': 'soffice.bin', 'timeout': 120000 }, 'pdftk': { 'binary': 'pdftk', 'timeout': 120000 }, 'pdf2htmlEX':{ 'binary': 'pdf2htmlEX', 'timeout': 120000 }, 'link': { 'renderDelay': 7500, 'renderTimeout': 30000, 'embeddableCheckTimeout': 15000 }, 'credentials': { 'username': 'administrator', 'password': 'administrator' } };

/**

  • config.signing *
  • Configuration namespace for the signing logic *
  • @param {String} key This key will be used to sign URLs like profile pictures, content previews, etc.. . It's vital to the security of the system that you change this in production. */ config.signing = { 'key': 'The default signing key, please change me.' };

/**

  • config.activity *
  • Configuration namespace for activities. *
  • @param {Boolean} [processActivityJobs] Whether or not this server node should produce and route activities. Defaults to true
  • @param {Number} [activityTtl] The time-to-live (in seconds) for generated activities. After this period of time, an activity in an activity feed is lost permanently. Defaults to 2 weeks
  • @param {Number} [aggregateIdleExpiry] The amount of time (in seconds) an aggregate can be idle until it expires. The "idle" time of an aggregate is reset when a new activity occurs that matches the aggregate. Defaults to 3 hours
  • @param {Number} [aggregateMaxExpiry] An upper-bound on the amount of time (in seconds) for which an aggregate can live. Defaults to 1 day
  • @param {Number} [numberOfProcessingBuckets] The number of buckets available for parallel processing of activities. Defaults to 3
  • @param {Number} [collectionExpiry] The maximum amount of time (in seconds) a processing bucket can be locked for at one time. If this is not long enough for an activity processor to collect the number of activities as configured by collectionBatchSize, then it will be possible for multiple processors to collect the same bucket concurrently. This will result in duplicate activities, which is not desired. Defaults to 1 minute
  • @param {Number} [maxConcurrentCollections] The maximum number of concurrent collection cycles that can be active on a process at once. Defaults to 3
  • @param {Number} [maxConcurrentRouters] The maximum number of activities that will be routed by one node at one time. This should be used to ensure activities are not routed faster than they can be collected, to ensure the redis collection buckets do not grow in size uncontrollably under unanticipated load. Defaults to 5
  • @param {Number} [collectionPollingFrequency] How often (in seconds) the processing buckets are polled for new activities. If -1, polling will be disabled. If polling is disabled, activities will not function, so do not set to -1 in production. Defaults to 5 seconds.
  • @param {Number} [collectionBatchSize] The number of items to process at a time when collecting bucketed activities. After one batch has been collected, the activity processor will immediately continue to process the next batch from that bucket, and so on. Defaults to 1000
  • @param {Object} [redis] Configuration for dedicated redis server. If not specified, will use the same pool as the rest of the container (i.e., as specified by config.redis)
  • @param {String} [redis.host] The host of the dedicated redis server
  • @param {Number} [redis.port] The port of the dedicated redis server
  • @param {String} [redis.pass] The password to the dedicated redis server
  • @param {Number} [redis.dbIndex] The index number of the dedicated redis server index / config.activity = { 'processActivityJobs': true, 'activityTtl': 2 * 7 * 24 * 60 * 60, // 2 weeks (in seconds) 'numberOfProcessingBuckets': 3, 'aggregateIdleExpiry': 3 * 60 * 60, // 3 hours (in seconds) 'aggregateMaxExpiry': 24 * 60 \ 60, // 1 day (in seconds) 'collectionExpiry': 60, // 1 minute (in seconds) 'maxConcurrentCollections': 3, 'maxConcurrentRouters': 5, 'collectionPollingFrequency': 5, // 5 seconds 'collectionBatchSize': 1000, 'redis': null };

/**

  • config.email *
  • Configuration namespace for emails. *
  • @param {Boolean} [debug] Determines whether or not email is in debug mode. If in debug mode, email messages are logged, not actually sent through any service.
  • @param {String} transport Which method of e-mail transport should be used. Either SMTP or sendmail.
  • @param {String} deduplicationInterval Specifies the interval in seconds in which the same email can't be sent out again
  • @param {Object} throttling The throttling configuration
  • @param {Number} throttling.count Specifies the number of emails a user can receive in throttling.timespan seconds before throttling takes effect
  • @param {Number} throttling.timespan Specifies the throttling timespan in seconds
  • @param {String} [customEmailTemplatesDir] Specifies a directory that holds the tenant-specific email template overrides
  • @param {Object} [sendmailTransport] The sendmail information for sending emails.
  • @param {String} [sendmailTransport.path] The path that points to the sendmail binary.
  • @param {Object} [smtpTransport] The SMTP connection information for sending emails. This is the settings object that will be used by nodemailer to form an smtp connection: https://github.com/andris9/Nodemailerhttps://www.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Fandris9%2FNodemailer&h=IAQHUeTIW&enc=AZM1AZLtb3x7kdNFaeQpb--tEsHfAz3WIbLOfb78vShGZ-5_TJg0DVyLVUzOs13JvHql26vbYW8iDebYCkDst-67uB2eVSBOiZivkiBs_nr1xS_HWthOP0MCcFsDQqm13hhmCYilo90wAf14oOgaEe-L&s=1 / config.email = { 'debug': true, 'customEmailTemplatesDir': null, 'deduplicationInterval': 7 * 24 * 60 * 60, // 7 days 'throttling': { 'count': 10, 'timespan': 2 \ 60 // 2 minutes }, 'transport': 'SMTP', 'sendmailTransport': { 'path': '/usr/sbin/sendmail' }, 'smtpTransport': { 'service': 'Gmail', 'auth': { 'user': 'my.email@gmail.com', 'pass': 'myemailpassword' } } };

/**

/**

/**

  • config.tincanapi *
  • Configuration namespace for the TinCan API logic *
  • @param {Number} timeout Defines the timeout (in ms) when the request to the LRS should be killed */ config.tincanapi = { 'timeout': 4000 };

On Thu, Mar 13, 2014 at 5:02 PM, Nicolaas Matthijs < notifications@github.com> wrote:

@souske https://github.com/souske : It looks like the batch request to http://admin.sakaioae.jupinno.com/api/ui/staticbatch?files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fdefault.properties&files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fen_GB.propertiesreturns as:

{"/ui/bundles.3fee9415/default.properties":null,"/ui/bundles.3fee9415/en_GB.properties":null}

This indicates that Hilary is not able to locate the 3akai-ux files. My suspicion is that config.ui.path in Hilary's config.js file is pointing to the unoptimized 3akai-ux folder. You'll need to change that path to point to the correct target/optimized folder.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37511731 .

souske commented 10 years ago

Hi sir, Do i need to run the nakamura.jar?i see some videos that they just use the nakamura.jar thing and hilary was not mentioned?Im trying to create a production set up for our possible client in the future?

On Thu, Mar 13, 2014 at 9:53 PM, Michael Anthony Balmes < souskemickel@gmail.com> wrote:

hi sir, I removed the trailing slashes in my nginx.conf..and the gui appears.yet the css file was not applied in my admin.sakaioae.jupinno.com ..

On Thu, Mar 13, 2014 at 5:32 PM, Michael Anthony Balmes < souskemickel@gmail.com> wrote:

hi sir,

i changed it...

/*

  • Copyright 2014 Apereo Foundation (AF) Licensed under the
  • Educational Community License, Version 2.0 (the "License"); you may
  • not use this file except in compliance with the License. You may
  • obtain a copy of the License at *
  • http://opensource.org/licenses/ECL-2.0 *
  • Unless required by applicable law or agreed to in writing,
  • software distributed under the License is distributed on an "AS IS"
  • BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing
  • permissions and limitations under the License. */

var bunyan = require('bunyan');

var config = module.exports.config = {};

// UI related config information. By default, we assume that the UI repostory // can be found on the same level as the Hilary folder.

/**

  • config.ui *
  • Configuration namespace for the UI module. *
  • @param {String} path The path to the UI static assets */ config.ui = { 'path': '/opt/3akai-ux/target/optimized/' };

// Cassandra related config information. config.cassandra = { 'hosts': ['127.0.0.1:9160'], 'keyspace': 'oae', 'user': '', 'pass': '', 'timeout': 3000, 'replication': 1, 'strategyClass': 'SimpleStrategy', 'cqlVersion': '2.0.0' };

// The redis related configuration information. // The dbIndex key allows for seperation of actual and unit test data. // By default redis starts up with 16 DB indexes so there should // be no need to create one. // We'll assume that: // 0 = production // 1 = unit tests config.redis = { 'host': '127.0.0.1', 'port': 6379, 'pass': '', 'dbIndex': 0 };

/**

  • config.servers *
  • Configuration namespace for servers. *
  • @param {String} globalAdminAlias The tenant alias that will be used for the global admins
  • @param {String} globalAdminHost The hostname on which the global admin server can be reached by users
  • @param {Number} globalAdminPort The network port on which the global admin express server can run
  • @param {String} [serverInternalAddress] The internal hostname on which the server can be reached by OAE services such as the preview processor
  • @param {Number} tenantPort The network port on which the tenant express server can run
  • @param {Boolean} useHttps Whether or not the server is accessible via HTTPS. Hilary will not expose an HTTPS server, it's up to a frontend server such as Apache or Nginx to deal with the actual delivery of HTTPS traffic. This flag is mainly used to generate correct backlinks to the web application
  • @param {Boolean} [strictHttps] Whether or not the server is using a valid SSL certificate. If true, any attempts to connect to the REST endpoints using an invalid certificate should result in an error and not be ignored. If false, a valid certificate will not be required */ config.servers = { 'globalAdminAlias': 'admin', 'globalAdminHost': 'admin.sakaioae.jupinno.com', 'globalAdminPort': 2000, 'serverInternalAddress': null, 'tenantPort': 2001, 'useHttps': false, 'strictHttps': true };

var tmpDir = process.env.TMP || process.env.TMPDIR || process.env.TEMP || '/tmp' || process.cwd(); tmpDir += '/oae';

/**

  • config.files *
  • Configuration namespace for files. *
  • @param {String} tmpDir The directory where temporary files can be created. (profile pictures when cropping, ...)
  • @param {String} uploadDir The directory where upload files can be buffered before moving them over to the configured storage backend.
  • @param {Object} cleaner Holds configuration properties for the cleaning job that removes lingering files in the upload directory.
  • @param {Boolean} cleaner.enabled Whether or not the cleaning job should run.
  • @param {Number} cleaner.interval Files that haven't been accessed in this amount (of seconds) should be removed.
  • @param {String} localStorageDirectory The directory where the local storage backend can store its files. By default, the files get stored on the same level as the Hilary directory. Note: the absolute path to this directory should also be configured in the Nginx config file. This directory will not be used when Amazon S3 file storage is used.
  • @param {String} limit The maximum file upload size, accepted formats look like "5mb", "200kb", "1gb". You should also adjust your front-end proxy (e.g., Nginx, Apache) to also handle files of this size _/ config.files = { 'tmpDir': tmpDir, 'uploadDir': tmpDir + '/uploads', 'cleaner': { 'enabled': true, 'interval': 2_60*60 }, 'localStorageDirectory': '/opt/files' };

// The configuration that can be used to generate secure HTTP cookies. // It's strongly recommended that you change this value. // Make sure that this value is the same accross each app server. config.cookie = { 'secret': 'this secret will be used to sign your cookies, change me!' };

config.log = { 'streams': [ { 'level': 'info', 'stream': process.stdout } ], 'serializers': { 'err': bunyan.stdSerializers.err, 'req': bunyan.stdSerializers.req, 'res': bunyan.stdSerializers.res } };

/**

/**

/**

  • config.mq *
  • Configuration namespace for the message queue (RabbitMQ). *
  • @param {Object} connection The connection description
  • @param {String} connection.host The host for the connection
  • @param {Number} connection.port The port for the connection
  • @param {Boolean} [purgeQueuesOnStartup] If true, the application will delete all messages in a queue when a worker is first bound. This setting only takes effect if the NODE_ENV environment variable is not set to production to indicate a production environment. Default: false */ config.mq = { 'connection': { 'host': 'localhost', 'port': 5672 }, 'purgeQueuesOnStartup': false };

/**

  • config.previews *
  • Configuration namespace for the preview processor. *
  • @param {Boolean} enabled Whether or not the preview processor should be running
  • @param {String} dir A directory that can be used to store temporary files in
  • @param {Object} office Holds the configuration for anything Office related
  • @param {String} office.binary The path to the 'soffice.bin' binary that starts up Libre Office. ex: On OS X it is /Applications/LibreOffice.app/Contents/MacOS/soffice.bin with a default install
  • @param {Number} office.timeout Defines the timeout (in ms) when the Office process should be killed
  • @param {Object} pdf Holds the configuration for anything related to PDF splitting
  • @param {String} pdf.binary The path to the pdftk binary that can be used to split a PDF file into a PDF-per-page
  • @param {Number} pdf.timeout Defines the timeout (in ms) when the pdftk process should be killed
  • @param {Object} pdf2htmlEX Holds the configuration for anything related to converting a PDF file into an HTML file
  • @param {String} pdf2htmlEX.binary The path to the pdf2htmlEX binary that can be used to convert a PDF file into an HTML file
  • @param {Number} pdf2htmlEX.timeout Defines the timeout (in ms) when the pdf2htmlEX process should be killed
  • @param {Object} link Holds the configuration for anything related to link processing
  • @param {String} link.renderDelay Defines the timeout (in ms) that should be waited between loading the page and taking a screenshot
  • @param {Number} link.renderTimeout Defines the timeout (in ms) when the screencapturing should be stopped. This should include the renderDelay
  • @param {Number} link.embeddableCheckTimeout Defines the timeout (in ms) when the embeddable link check should be stopped
  • @param {Object} credentials Holds the credentials that can be used to log on the global admin server
  • @param {String} credentials.username The username to login with on the global admin server
  • @param {String} credentials.password The password to login with on the global admin server */ config.previews = { 'enabled': false, 'dir': tmpDir + '/previews', 'office': { 'binary': 'soffice.bin', 'timeout': 120000 }, 'pdftk': { 'binary': 'pdftk', 'timeout': 120000 }, 'pdf2htmlEX':{ 'binary': 'pdf2htmlEX', 'timeout': 120000 }, 'link': { 'renderDelay': 7500, 'renderTimeout': 30000, 'embeddableCheckTimeout': 15000 }, 'credentials': { 'username': 'administrator', 'password': 'administrator' } };

/**

  • config.signing *
  • Configuration namespace for the signing logic *
  • @param {String} key This key will be used to sign URLs like profile pictures, content previews, etc.. . It's vital to the security of the system that you change this in production. */ config.signing = { 'key': 'The default signing key, please change me.' };

/**

  • config.activity *
  • Configuration namespace for activities. *
  • @param {Boolean} [processActivityJobs] Whether or not this server node should produce and route activities. Defaults to true
  • @param {Number} [activityTtl] The time-to-live (in seconds) for generated activities. After this period of time, an activity in an activity feed is lost permanently. Defaults to 2 weeks
  • @param {Number} [aggregateIdleExpiry] The amount of time (in seconds) an aggregate can be idle until it expires. The "idle" time of an aggregate is reset when a new activity occurs that matches the aggregate. Defaults to 3 hours
  • @param {Number} [aggregateMaxExpiry] An upper-bound on the amount of time (in seconds) for which an aggregate can live. Defaults to 1 day
  • @param {Number} [numberOfProcessingBuckets] The number of buckets available for parallel processing of activities. Defaults to 3
  • @param {Number} [collectionExpiry] The maximum amount of time (in seconds) a processing bucket can be locked for at one time. If this is not long enough for an activity processor to collect the number of activities as configured by collectionBatchSize, then it will be possible for multiple processors to collect the same bucket concurrently. This will result in duplicate activities, which is not desired. Defaults to 1 minute
  • @param {Number} [maxConcurrentCollections] The maximum number of concurrent collection cycles that can be active on a process at once. Defaults to 3
  • @param {Number} [maxConcurrentRouters] The maximum number of activities that will be routed by one node at one time. This should be used to ensure activities are not routed faster than they can be collected, to ensure the redis collection buckets do not grow in size uncontrollably under unanticipated load. Defaults to 5
  • @param {Number} [collectionPollingFrequency] How often (in seconds) the processing buckets are polled for new activities. If -1, polling will be disabled. If polling is disabled, activities will not function, so do not set to -1 in production. Defaults to 5 seconds.
  • @param {Number} [collectionBatchSize] The number of items to process at a time when collecting bucketed activities. After one batch has been collected, the activity processor will immediately continue to process the next batch from that bucket, and so on. Defaults to 1000
  • @param {Object} [redis] Configuration for dedicated redis server. If not specified, will use the same pool as the rest of the container (i.e., as specified by config.redis)
  • @param {String} [redis.host] The host of the dedicated redis server
  • @param {Number} [redis.port] The port of the dedicated redis server
  • @param {String} [redis.pass] The password to the dedicated redis server
  • @param {Number} [redis.dbIndex] The index number of the dedicated redis server index / config.activity = { 'processActivityJobs': true, 'activityTtl': 2 * 7 * 24 * 60 * 60, // 2 weeks (in seconds) 'numberOfProcessingBuckets': 3, 'aggregateIdleExpiry': 3 * 60 * 60, // 3 hours (in seconds) 'aggregateMaxExpiry': 24 * 60 \ 60, // 1 day (in seconds) 'collectionExpiry': 60, // 1 minute (in seconds) 'maxConcurrentCollections': 3, 'maxConcurrentRouters': 5, 'collectionPollingFrequency': 5, // 5 seconds 'collectionBatchSize': 1000, 'redis': null };

/**

  • config.email *
  • Configuration namespace for emails. *
  • @param {Boolean} [debug] Determines whether or not email is in debug mode. If in debug mode, email messages are logged, not actually sent through any service.
  • @param {String} transport Which method of e-mail transport should be used. Either SMTP or sendmail.
  • @param {String} deduplicationInterval Specifies the interval in seconds in which the same email can't be sent out again
  • @param {Object} throttling The throttling configuration
  • @param {Number} throttling.count Specifies the number of emails a user can receive in throttling.timespan seconds before throttling takes effect
  • @param {Number} throttling.timespan Specifies the throttling timespan in seconds
  • @param {String} [customEmailTemplatesDir] Specifies a directory that holds the tenant-specific email template overrides
  • @param {Object} [sendmailTransport] The sendmail information for sending emails.
  • @param {String} [sendmailTransport.path] The path that points to the sendmail binary.
  • @param {Object} [smtpTransport] The SMTP connection information for sending emails. This is the settings object that will be used by nodemailer to form an smtp connection: https://github.com/andris9/Nodemailerhttps://www.facebook.com/l.php?u=https%3A%2F%2Fgithub.com%2Fandris9%2FNodemailer&h=IAQHUeTIW&enc=AZM1AZLtb3x7kdNFaeQpb--tEsHfAz3WIbLOfb78vShGZ-5_TJg0DVyLVUzOs13JvHql26vbYW8iDebYCkDst-67uB2eVSBOiZivkiBs_nr1xS_HWthOP0MCcFsDQqm13hhmCYilo90wAf14oOgaEe-L&s=1 / config.email = { 'debug': true, 'customEmailTemplatesDir': null, 'deduplicationInterval': 7 * 24 * 60 * 60, // 7 days 'throttling': { 'count': 10, 'timespan': 2 \ 60 // 2 minutes }, 'transport': 'SMTP', 'sendmailTransport': { 'path': '/usr/sbin/sendmail' }, 'smtpTransport': { 'service': 'Gmail', 'auth': { 'user': 'my.email@gmail.com', 'pass': 'myemailpassword' } } };

/**

/**

/**

  • config.tincanapi *
  • Configuration namespace for the TinCan API logic *
  • @param {Number} timeout Defines the timeout (in ms) when the request to the LRS should be killed */ config.tincanapi = { 'timeout': 4000 };

On Thu, Mar 13, 2014 at 5:02 PM, Nicolaas Matthijs < notifications@github.com> wrote:

@souske https://github.com/souske : It looks like the batch request to http://admin.sakaioae.jupinno.com/api/ui/staticbatch?files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fdefault.properties&files%5B%5D=%2Fui%2Fbundles.3fee9415%2Fen_GB.propertiesreturns as:

{"/ui/bundles.3fee9415/default.properties":null,"/ui/bundles.3fee9415/en_GB.properties":null}

This indicates that Hilary is not able to locate the 3akai-ux files. My suspicion is that config.ui.path in Hilary's config.js file is pointing to the unoptimized 3akai-ux folder. You'll need to change that path to point to the correct target/optimized folder.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37511731 .

nicolaasmatthijs commented 10 years ago

See #846 for Nakamura response. I am currently not able to connect to your server, so it is hard to see what's wrong. Please send your Nginx config and log file to the mailing list for easier debugging.

souske commented 10 years ago

user nginx nginx; #<%= nginxConf.NGINX_USER %> <%= nginxConf.NGINX_GROUP %>;

worker_processes 5; error_log logs/error.log; pid logs/nginx.pid; worker_rlimit_nofile 8192;

gzip on; gzip_min_length 1000; gzip_http_version 1.1; gzip_comp_level 5; gzip_proxied any; gzip_types text/css text/plain text/xml application/xml application/xml+rss text/javascript application/javascript application/x-javascript application/json;

################## ##################

GLOBAL ADMIN

################## ##################

####################

LOAD BALANCING

####################

upstream globaladminworkers { server 127.0.0.1:2000;

Add extra app nodes here.

}

server { listen 80; server_name admin.sakaioae.jupinno.com;

######################

SHARED RESOURCES

######################

location /shared/ { alias /opt/3akai-ux/target/optimized/shared; autoindex off; expires max; }

rewrite ^/favicon.ico /shared/oae/img/favicon.ico last;

#####################

ADMIN RESOURCES

#####################

location /admin/ { alias /opt/3akai-ux/target/optimized/admin; autoindex off; expires max; }

HTML files under /admin are not hashed and should not be cached

location ~* /admin/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/admin/$1.html; expires -1; }

rewrite ^/$ /admin/index.html last; rewrite ^/tenant/(.*)$ /admin/index.html last;

#########################

APP SERVER REQUESTS

#########################

location /api/ui/skin { expires 15m; proxy_pass http://globaladminworkers; }

location /api/ui/staticbatch { expires max; proxy_pass http://globaladminworkers; }

location /api/ui/widgets { expires 15m; proxy_pass http://globaladminworkers; }

Explicitly don't cache any other API requests

location /api/ { expires -1; proxy_pass http://globaladminworkers; } }

################### ###################

TENANT SERVER

################### ###################

####################

LOAD BALANCING

####################

upstream tenantworkers { server 127.0.0.1:2001;

Add extra app nodes here.

}

server { listen 80 default_server;

######################

SHARED RESOURCES

######################

location /shared/ { alias /opt/3akai-ux/target/optimized/shared; autoindex off; expires max; }

HTML files under /shared/oae/errors are not hashed and should not be

cached location ~* /shared/oae/errors/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/shared/oae/errors/$1.html; expires -1; }

rewrite ^/accessdenied /shared/oae/errors/accessdenied.html last; rewrite ^/maintenance /shared/oae/errors/maintenance.html last; rewrite ^/noscript /shared/oae/errors/noscript.html last; rewrite ^/notfound /shared/oae/errors/notfound.html last; rewrite ^/unavailable /shared/oae/errors/unavailable.html last;

rewrite ^/favicon.ico /shared/oae/img/favicon.ico last;

#####################

ADMIN RESOURCES

#####################

location /admin/ { alias /opt/3akai-ux/target/optimized/admin; autoindex off; expires max; }

HTML files under /admin are not hashed and should not be cached

location ~* /admin/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/admin/$1.html; expires -1; }

rewrite ^/admin$ /admin/index.html last;

#######################

MAIN UI RESOURCES

#######################

TODO: Remove this custom landing page strategy and /custom handling when

we have configurable landing pages

location = / {

autoindex off;

expires -1;

Tell Nginx that the root is the UI directory so custom files can be

located with try_files

root <%= nginxConf.UX_HOME %>;

try_files /custom/$host/index.html /ui/index.html;

}

location /ui/ { alias /opt/3akai-ux/target/optimized/ui; autoindex off; expires max; }

location /custom/ { alias /opt/3akai-ux/target/optimized/custom; autoindex off; expires max; }

HTML files under /ui are not hashed and should not be cached

location ~* /ui/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/ui/$1.html; expires -1; }

rewrite ^/content /ui/content.html last; rewrite ^/discussion /ui/discussion.html last; rewrite ^/group /ui/group.html last; rewrite ^/me /ui/me.html last;

rewrite ^/$ /ui/index.html last;

rewrite ^/search /ui/search.html last; rewrite ^/user /ui/user.html last;

######################

WIDGET RESOURCES

######################

location /node_modules/ { alias /opt/3akai-ux/target/optimized/node_modules; autoindex off; expires max; }

####################

DOCS RESOURCES

####################

location /docs/ { alias /opt/3akai-ux/target/optimized/docs; autoindex off; }

HTML files under /docs are not hashed and should not be cached

location ~* /docs/([^.]+).html$ { alias /opt/3akai-ux/target/optimized/docs/$1.html; expires -1; }

rewrite ^/docs$ /docs/index.html last; rewrite ^/docs/backend /docs/index.html last; rewrite ^/docs/frontend /docs/index.html last;

####################

TEST RESOURCES

####################

location /tests/ { alias /opt/3akai-ux/target/optimized/tests; autoindex off; expires -1; }

rewrite ^/tests$ /tests/index.html last;

#################

ERROR PAGES

#################

error_page 401 /shared/oae/errors/accessdenied.html; error_page 404 /shared/oae/errors/notfound.html; error_page 502 /shared/oae/errors/unavailable.html; error_page 503 /shared/oae/errors/maintenance.html;

#########################

APP SERVER REQUESTS

#########################

location /api/auth/shibboleth/callback { expires -1; proxy_read_timeout 120; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/config { expires 15m; proxy_pass http://tenantworkers; }

location /api/content/create { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/messages { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/newversion { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/content/([^\/]+)/revisions/([^\/]+)/previews { expires -1; proxy_read_timeout 1200; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/discussion/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/discussion/([^\/]+)/messages { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

This can be cached indefinitely because we use signatures that change

over time to control invalidation location /api/download/signed { expires max; proxy_pass http://tenantworkers; }

location /api/group/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/group/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/ui/skin { expires 15m; proxy_pass http://tenantworkers; }

location ~* /api/group/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/ui/staticbatch { expires max; proxy_pass http://tenantworkers; }

location /api/ui/widgets { expires 15m; proxy_pass http://tenantworkers; }

location /api/user/create { expires -1; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location /api/user/import { expires -1; proxy_read_timeout 300; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

location ~* /api/user/([^\/]+)/picture { expires -1; proxy_read_timeout 60; proxy_next_upstream error http_502; proxy_pass http://tenantworkers; }

########################

PUSH NOTIFICATIONS

########################

location /api/push/ { proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_pass http://tenantworkers; proxy_redirect off; proxy_buffering off; proxy_read_timeout 3600; }

Explicitly don't cache any other API requests

location /api/ { expires -1; proxy_pass http://tenantworkers; }

####################

FILE DOWNLOADS

####################

Determines the maximum filesize that a user can upload.

client_max_body_size 4096M;

An internal endpoint that is used by the local file storage backend.

Change the alias so that it points to the directory that will contain the

file bodies.

This should match with the oae-content/storage/local-dir config value as

configured

in the admin UI.

location /files { internal; alias ../files; }

######################

ETHERPAD SERVERS

######################

location /etherpad/0 { expires 15m;

rewrite ^/etherpad/0(.*)$ $1 break;

proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=rAQEaT5F6&enc=AZN5HF5MRM5egQr7Q2kw4l_AuGVv_lND0kDWaZK37MIMKwjSqYwYxcMWLSaiM93V5B4vEih8-DmRUaL4-Y7fna3qzBC-q0qg4fVZOS7-cOGeER_cy_z_TrPm8QY6XZY9t38iDPnQ4MjpDLrJDlVOK-tj&s=1 ; proxy_buffering off; proxy_read_timeout 60; }

A similar configuration is used for each deployed etherpad server

location /etherpad/1 { expires 15m;

rewrite ^/etherpad/1(.*)$ $1 break;

proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=QAQFiuyW1&enc=AZPgHxPtSVIvXJkWJiXNaxxqiGVLuAPq2Qr9HZDxuPdInuYdmy--tl1RqcjM6HjjrS9pRPF-7vhF-WJplr-3_XA_6I1bZRCAtnWTWvF7wb6n85OSEiNDbZSjXX5qUe4_utwDt6AgepcpBVOhkWErY9Ax&s=1 ; proxy_buffering off; proxy_read_timeout 60; }

location /etherpad/0/socket.io/0/websocket/ { rewrite ^/etherpad/0(.*)$ $1 break;

proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection "upgrade"; proxy_set_header Host $host; proxy_pass http://sakaioae.jupinno.com:9001http://www.facebook.com/l.php?u=http%3A%2F%2Fsakaioae.jupinno.com%3A9001%2F&h=AAQEqgyCe&enc=AZOm9yg__UU_wYkI65pHUwfP6zcKAouqMfVLypfwHJu7L2nFa67GA5UG2jxSBCpdZbzp6M_mwp-VtLJ-UfZey7Xh1tnMs5lYT3m7w1WDv6Y5T5MrLn70LfLpuxXsFwJF4XKbOEhtqLRH_K05VEIeRdjx&s=1 ; proxy_buffering off; proxy_read_timeout 60; } }

include /opt/3akai-ux/nginx/mime.conf; }

right now the server is down coz im fixing it..i already see this page (attached image) but the css is not working..and when i login administrator /administrator/ i have this 403 error

On Fri, Mar 14, 2014 at 5:07 PM, Nicolaas Matthijs <notifications@github.com

wrote:

See #846 https://github.com/oaeproject/Hilary/issues/846 for Nakamura response. I am currently not able to connect to your server, so it is hard to see what's wrong. Please send your Nginx config and log file to the mailing list for easier debugging.

Reply to this email directly or view it on GitHubhttps://github.com/oaeproject/Hilary/issues/841#issuecomment-37628014 .

nicolaasmatthijs commented 10 years ago

@souske: The Nginx config file you pasted seems to have a lot of stuff missing compared to the example one in 3akai-ux/nginx/nginx.conf. There is no http block, things are out of place, there are no trailing slashes in the location blocks, etc.

My recommendation would be to use the one in 3akai-ux/nginx/nginx.conf as your template, and only replace the items within <%= %>.

I'm going to close this issue as questions like these really need to go to the email list.