I made an application with Next.js and used node.js in the api part. I had no problems using it on my own computer, but when I run it on my server in digitalocean, the photos I uploaded from the administration panel are not shown. When I check the database and directory, there is no problem. The photo is being recorded there. section is correct when I enter the site and check it. When I wear path / file.jpg it gives 404 error.
There is no problem in the previous recordings and it shows the photos. The photos do not show after running on the server.
I made folder permissions 777, but nothing else came to my mind. I didn't add code because I didn't think there was a problem with the code.
I solved the problem as follows: It started to work after defining express static files into the API.
Related
I have a nodejs/express application and an atlas mongoDB set up. I can get the data from the database to my app if it is running on local host. When I try and deploy the app as a web app through Azure, it does not work; I click the button to get/display the data but nothing happens. What is causing this issue and how do I fix it?
I figured out what was wrong. My repository did not include a web.config file at all. Having never worked with web applications or Node before, I did not know this was needed. Once I added the file and put the proper path in, the code began working as intended. I can update this post with actual code if someone wants it.
I'm trying to run the simplest node/express app which has a single get request that sends hello world as response. Works on local.
I followed this tutorial for deploying it on A2 hosting shared plan, but I'm getting default a2 hosting page and not my app.
Tutorial followed: https://medium.com/#pampas93/host-your-node-js-app-on-shared-hosting-go-beyond-localhost-73ab923e6691
I tried contacting support. They responded:
App is on a different location and website is looking at different location.
To make it use the path that you need may require custom coding or alterations to the .htaccess file to change the document root for the primary domain.
I'm not able to understand what changes to make/how to fix this. Any help would be appreciated.
The .htaccess file in my cpanel is empty right now. No code is written inside it.
I am having this problem for about two days now and I tried all the solutions that I could find online, but still no luck.
what's happening is that in my game, when I press a specific button I am supposed to register to a private database server of mine that is hosted in azure.
when running the build on IOS or Android I have no problem with registering, but in the Unity web player build I get a "Rejected because no crossdomain.xml policy file was found" error, even though I made sure that the file is located in the root of my server and is formatted ASCII, as written in the Unity sandbox guide.
I am only using the WWW class and no socket.
When I try registering from my localhost and from the unity editor i have no problems, but only when i upload the html file to an online host, such as dropbox, and access it through a URL the problem occurs.
if anyone can help me find the problem it would be amazing. I have finished my game and it works perfectly on all platforms except the web player, so it is the only thing that is holdin me back. thanks allot
In the docs on unity webplayer sandbox it gives you the reason for this. A quick fix is to add a file accesable on http://yourdomain/crossdomain.xml with the contents:
<?xml version="1.0"?>
<cross-domain-policy>
<allow-access-from domain="*"/>
</cross-domain-policy>
I have looked extensively through SO, but have yet to find any help with this question, despite trying almost every recommendation.
https://github.com/danwaz/powerhour
trying to install this app on Spotify. I do have a developer account, and have created the necessary dir in ~/documents/Spotify
For whatever reason, I am shown a loading bar when I attempt to load the app according to how the manifest details the bundle. I do get a "metadata started" message, but nothing loads...it just sits there spinning its' wheels.
Any recommendations from anyone?
What platform are you on?
If you're on a Mac or Linux, the folder should be ~/Spotify, where ~ is your home directory.
If you're on Windows, it should be in the Spotify directory of your My Documents folder.
Problem
I uploaded an image using the inbuilt tool and added it to a blog post. All this on the production server, across the pond in Montana, US.
It displays fine (using the correct absolute path it should: "/Media/Default/BlogPost/...") in the preview of the blog post. But once I publish it, I get a broken image in the live site. The reason being that the path renders as:
http://localhost:[port number]/Media/Default/BlogPost/...
Obviously, if running on a Dev machine, this will still work, but once on the live web server, this no longer works.
History
I downloaded WebMatrix onto my machine, downloaded orchard, installed the Minty theme, made a new theme that uses Minty as the BaseTheme. Then, once everything was almost there, uploaded onto the live web server.
I can't see how this can affect how the server interprets an absolute path, but maybe I am missing something?
Fudged solution
I can fudge a solution by using the URL of the site i.e. I open the image picker and in the URL for the image resource text box I put:
http://blogs.mysite.co.uk/Media/Default/BlogPost/...
With this full URL, the problem goes away, but it is a fudge and I shouldn't need to do this.
Any suggestions?
#gelistir from the Orchard discussion pages answered this.
It is caused by a module, the Vanderlay Relative URL Filter module. Disabling the module (that I wasn't using anyway, not even sure what it does...) solved the issue.
For whatever this is worth, more than 2 years have passed since the question was asked. Anyway, if the problem described here happens to you, on the dashboard go into Settings and under "General", set your base url to your "http://www.yourdomain.com", instead of to "http://localhost[portnumber]". This is where the Vanderlay module gets the url to rewrite from.
Regards,