Comments (7)
Hi Norman,
You can easily achieve that by changing the nginx configuration, just like;
server {
listen 80;
server_name localhost;
access_log off;
location = /countly/i {
proxy_pass http://127.0.0.1:3001;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Real-IP $remote_addr;
}
location = /countly/o {
proxy_pass http://127.0.0.1:3001;
}
location /countly/ {
proxy_pass http://127.0.0.1:6001;
proxy_set_header Host $http_host;
}
}
Please tell me if I'm missing something.
from countly-server.
Already tried that and it didn't work. My guess is that it'll work for the api app since there are no redirects nor static file requests. For example if I use
location /countly
...
and when I'm not logged in then countly redirects to /login
and thus getting a 404.
I also tried to redirect rules but that doesn't work either.
An nginx based solution would be fine, but I guess that won't work.
from countly-server.
Thats right, API will work fine but the frontend app will have issues since every redirection/post/get is hardcoded there. In order to support this client side javascripts + express/app.js needs to read a configuration value from somewhere.
I think we can add two configs;
- frontend/express/config.js:
countlyConfig.web.path
- frontend/express/public/javascripts/countly/countly.config.js
countlyCommon.SERVER_PATH
and perform every operation accordingly. Also countly.install.sh can ask a path from the user during installation and perform the changes in the files automatically.
from countly-server.
What do you think about the static files? All static resources are referenced through absolute paths. So this config variable should be also accessable in template/html files.
As I'm new to express: I think that the mountPath option should be exposed to all views that reference assets. I'm trying to figure this out and hopefully provide a PR.
from countly-server.
The first thing that I can think of is using a <base>
tag inside the html files and remove leading /
from each src/url etc. absolute path.
I'll keep you posted if I come up with anything else.
from countly-server.
Another thing that needs to be done here is move all images under the css path because of http://stackoverflow.com/questions/2161377/is-the-html-base-tag-also-honored-by-scripting-and-css and here is the suggested solution http://stackoverflow.com/questions/3812375/specifying-base-url-for-css and I think I might have the pull request ready soon.
from countly-server.
Implemented in b657d76
Same server config required as mentioned by @osoner
and also definition in countly config.js files in both api and frontend should define countlyConfig.path = "/countly"
from countly-server.
Related Issues (20)
- Installer on Clean ubuntu fails to install countly correctly HOT 5
- issues with installation via docker compose HOT 4
- Login failed after I setup the environment and create the account HOT 7
- countly-browser可以帮我解释一下shardname 产生的使用的什么规则吗 HOT 1
- Countly frontend:latest crashing HOT 2
- macOS Versions not visible in dashboard HOT 2
- Can't install countly server on Macbook M1 Pro 2020 via docker-compose HOT 3
- Countly Dashboard does not show styles and action buttons HOT 4
- Allow Testing Push Notifications without Enterprise License HOT 3
- Landing page has a horizontal scroll HOT 2
- Not displaying special characters in crash logs HOT 3
- No button to "recalculate" a funnel HOT 1
- China map is displayed incorrectly HOT 5
- An event with a name ending with a "." will not show its segmentation in a dashboard widget.
- No way to reset 2FA for a user
- Separate port for api access and authentication logon
- spinning circle in data manager - No data
- Missing file: onboarding/data/versions/23.11/features.json
- nginx ssl config example uses deprecated directive (nginx: [emerg] unknown directive "ssl") HOT 2
- Segmentation seems to be broken - countly Unity SDK. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from countly-server.