I'm working for educational purpose on create a react app and serve it in a subdirectory of an existing domain which already hosts a web application.
Just to try to be more clear I have this situation:
www.mydomain.com (this is a web application currently online)
Now I need to put this new web app under
www.mydomain.com/test
To try to make it work I have my wwwroot folder with my brand new subfolder wwwroot/test.
Now the problem is that if I just put (in wwwroot/test) a simple html file with nothing more than just an <h1> tag, I can open the URL and see the content in it.
If I put my react-app (which work fine in my develop environment) I just see an empty page and if I open the inspector I see that some of the necessary resources aren't reachable because their requests point to root domain (www.mydomain.com/css/ionicons.min.css instead of www.mydomain.com/test/css/ionicons.min.css).
This is my very first time with IIS and I'm trying to get it work by myself, but it seems that I'm unable to find a proper solution to my problem...
Hopefully I was clear enough!
thanks in advance to all who will spent some time reading about this!
I've already made some research and all of them seems to point to some kind of redirect/rewrite rule to write in the web.config of my subdirectory app and/or in the web.config of the root app.
I've also tried to put "homepage": ".", in the package.json which solved the problem of the resources not getting loaded from the proper path but the page is still blank.
Related
Live Site
Repo
I just uploaded this project and the live site works fine. But for some reason the images are now gone when viewing it on localhost. It worked fine until I pushed and published the project.
The images folder is inside the public folder.
Also I just realized that when viewing the site on mobile, I seem to be able to scroll beyond the content (right and down). I’m not sure why that is..I also noticed that when viewing the site in the browser and enable touch simulation. Disabling it, it doesn't scroll beyond the content.
you have specified the file location as "./images/client-databiz.svg" for images
which is need to open the folder named images under the current JS file presents.
since during deploying it will build and make your code into static file
refer
you need to use "../../public/images/client-databiz.svg" to preview that actually.
I hope it will also work in production.
I have an app developed with CakePHP and it is working just fine on my local machine. Now, I wanted to develop another app with CakePHP. I installed cake in a different folder, configured vhost and server block and did everything like for the first app. I created an empty app, just basic controller and view and when I type the address for the second app I get the first app!!! Weird thing is that all links are working and when I click I get in browser url like secondapp/companies but the content is firstapp/companies. Once more, the second app is empty, no controllers, views and models, just a basic one. Then I did all that in htdocs, and the same problem occurs (none of the apps wasn't in htdocs, but in folders on E partition).
Can someone please give me some help before I kill myself?
Thank you...
If the problem is not on the database configuration, maybe cache problems ? Try it on a private browser/incognito ?
I am attempting to create a react based web app. I got it working the way I wanted, and it behaved as a web app the way I expected -- for now, that means to me that on my phone, from chrome, if from the chrome menu I choose 'Add to Home screen' it shows up as if it were an app (showing up with its own icon & launching in a new window outside of chrome).
After getting that working, I decided to reorganize so that the path would be the way I wanted it - from mydomain.com -> apps.mydomain.com/appName. I moved the code to the proper directory, and when I browse there I see my "app".
I noticed an issue right away where the static assets were not loading, I fixed that by adding a symlink in www/mydomain.com pointing to www/mydomain.com/appName/static. At this point, I thought my app was properly reorganized.
Unfortunately, when I tried "add to Home screen" from chrome, it now makes a regular shortcut, which to me seems to indicate the manifest.json isn't being applied. This all adds up to me to be a fundamental issue I don't understand with code organization for sub-paths which gave me pause.
So my question is: What do I need to do to properly host my web app in a sub-path?
Notes:
I am using nginx - I am suspicious that my issue lies in configuration there, and if more info on my configuration there is needed, I can provide it.
Regarding the change to apps. - sorry if it obfuscates the problem somewhat, to note I just added an alias - thus apps.mydomain.com appears to be equivalent to mydomain.com - I only noted it in case that assumption was wrong and part of the problem.
Pardon my question language if it's wrong, I am new-ish to web, and may not be using the lingo properly - that also is why I am probably having difficulty just googling this.
Thanks!
I think I figured it out. My app was made with create-react-app, and in the package.json I edited the homepage to be my path.
Found this out from here:
https://github.com/facebookincubator/create-react-app/blob/master/packages/react-scripts/template/README.md#building-for-relative-paths
I'm currently using Google Appengine to host a website with Golang as the backend. I have a custom domain setup and (sometimes) it works perfectly fine. My website requires some css and js files from the server. These were served perfectly in the past but now it randomly stops working. Both on the "mydomain.de" and on the "myapp.appspot.com" domains. Sometimes it works on the normal domain and then it works on the other and sometimes even on both. But if I reload the site after a couple of minutes it just shows me an old index.html file (that I have removed days ago).
Did someone experience this problem in the past and does anyone know a fix for this?
Thanks in advance.
Have you ruled out your browser cache as the source of the problem? If after getting a stale version, shift-reload (assuming Chrome or Firefox) brings up the desired version, then look into how to do "cache busting" for css and js, and check the app.yaml doc for how to set expiration times on static assets (assuming your index.html is static).
I have developed an application which uses custom CSS3 fonts. But somehow custom fonts are not getting uploaded in the server. My application URL is http://techcurt-kshitiz.rhcloud.com and when I try to access custom font like http://techcurt-kshitiz.rhcloud.com/resources/css/LindenHill-webfont.eot, The requested resource is not available appears. Custom fonts are working fine in my local machine in every browser.
I have recreated my application but still the problem persists. I have been using Openshift since an year but never faced such issue. What can be the possible reason for it? Even .less file is not getting uploaded. I am using tomcat 6 server in Openshift. I am not able to find out any solution in Google.
Do you see the files on disk when you SSH to the gear?
Are the files checked into Git? It's possible that they are being ignored by git, and hence not uploaded. You can check that the file is in git with "git show master:" - if ignored it won't show up.
Otherwise, it could be something in your build - perhaps the files are getting deleted?
Finally my issue is solved by servlet-mapping .ttf and .eot files in my web.xml files. But I am not able to understand how come my application was running in local machine but not in server? How come thats possible?