Direct URL works locally but not on server [duplicate] - aurelia

This question already has an answer here:
Configure IIS server to work with Aurelia framework and push state
(1 answer)
Closed 4 years ago.
I have a project created using Aurelia CLI v0.33.1 using Webpack. I have enabled pushState and index.ejs contains a <head> with:
<base href="<%- htmlWebpackPlugin.options.metadata.baseUrl %>">
which is currently set to "/" in my webpack.config.js (as I've seen suggested elsewhere for similar issues).
When I access the url locally via, http://localhost:8080/orders, I can view the page. After publishing to an Azure host, accessing https://<AzureHostURL>/orders results in a 404.
If I navigate to https://<AzureHostURL> and use the UI to navigate to /orders it works as expected.
It is unclear to me what the cause of this issue could be.

Thanks to direction from #avrahamcool, which provided me with an understanding of the problem, I found this Stack Overflow question which provided the exact solution I needed.

Related

Deploy VUE application on IIS [closed]

Closed. This question needs debugging details. It is not currently accepting answers.
Edit the question to include desired behavior, a specific problem or error, and the shortest code necessary to reproduce the problem. This will help others answer the question.
Closed 10 months ago.
The community reviewed whether to reopen this question 10 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I'm trying to deploy a VUE frontend application on IIS.
The routing is working fine in dev mode, however, something seems to break in the routing when I host my VUE app on IIS.
When I click on a link, I want to navigate to another page within the same single-page-app without having the website to refresh.
Instead what happens is that the route in the URL updates and the page refreshes, which results in a 404 Page Not Found error.
Can someone advise how to configure IIS to handle the routing of a VUE frontend app (I'm using vue-router)?

Is there a difference in page paths when on localhost verses deployed?

My app is created in next.js and works great in localhost. When I deployed it in heroku, only the front page shows up and all page paths do not work even though they are correctly inputted in the browser. The only page that is connected to the index.js file in my page paths is the front page. Do the other pages need to also be connected to the indec.js file? I am terribly lost with this issue since the site works perfectly in localhost. In heroku every page path besides / has a 404 error. I didn't add any code to this question since no one file seems relevant to the issue. I've been searching all over for an answer to this issue but can't seem to find any relevant information online since the app is deployed successfully it just won't render any file paths besides /.
Thank you in advance for any help you can offer. I really appreciate it!
Applications are ran differently on localhost and when deployed to the server. Since you added react tag on the post, I assume you are trying to deploy react native app on Heroku, there is lots of information on internet how to do it.
For example this post.
Anyway first you need to build your app correctly, so static files would be generated (you didn't mentioned how you are running that app).
To your question:
Relative paths are the same on both local and server, but absolute paths will be different.
But for your 404 error I see that no static content are found on the root path.

Insecure Content Blocked while browsing [duplicate]

This question already has answers here:
How to fix "page trying to load scripts from unauthenticated source" [closed]
(2 answers)
Closed 3 years ago.
insecure content blocked
When I published my site (https://myitside.com/instagram-downloader/), I always get a safety shield in the url-bar on top that says: Insecure content blocked. This page is trying to load scripts from unauthenticated sources. Because of this error, my site does not show icons or the correct font until I click "load unsafe scripts".
How to solve this
As it says, your page is trying to load scripts from unauthenticated sources...make sure those scripts are loading from https:// addresses and not http://.

Vue built a product to upload to the server

I'm building a web page for an event using bootstrap-vue (I started the projet with vue init bootstrap-vue/webpack my-project). I've used vue-build prod to compose and uploaded the whole folder to my server using filezilla. The problem is that the website is not fine, just a part of it is sawn.
Can you formulate the question differently? Its hard to find out what it is exactly you mean with
The problem is that the website is not fine, just a part of it is
sawn.
What does the console in your browser tell you? Vue has alot of debugging tools built in, so maybe you can post the console output, then we can tell a bit more..

Socket.io chat through apache server (also running php main site)

I have been trying to come up with a solution for my website to play nicely with socket.io. Right now I have apache serving my website (mostly in php) and I am trying to implement a live chat support feature using socket.io (node). I am able to get the chat functionality working separately (using express and going to wundertutor.com:8000) but when I just go to wundertutor.com (where the chat functionality is included as well), I am getting issues with CORS (Cross-origin resource sharing). Here is my error (on the client side):
XMLHttpRequest cannot load http://chat.wundertutor.com/socket.io/1/?t=1356421805823. Origin http://wundertutor.com is not allowed by Access-Control-Allow-Origin.
OR
XMLHttpRequest cannot load http://chat.wundertutor.com/socket.io/1/?t=1356422229000. Cannot use wildcard in Access-Control-Allow-Origin when credentials flag is true.
depending on wether I include this line of code in my app.js
io.set("origins","http://wundertutor.com");
Basically, I just want my node app to be a suppliment to my main site, but I really don't know where to specify the CORS parameters. I have tried doing this in my .htaccess file, in app.js, as well as in the client javascript, none of which have proved successful.
(Also, another thing I find strange is that when I go to wundertutor.com:8000, my node app correctly opens up a websocket, but when I try to go to wundertutor.com, it tries to use XHR polling which ends up causing this CORS mess)
Any suggestions would really be appreciated!
I figured out my problem if anyone else is experiencing the same issue. While I still think that what I am trying to do is using CORS, I didn't have to do any specific setting of Access-Allow-Origin-Control on either the Apache or node.js side. What I did to fix my problem was to serve the socket.io javascript file from the node.js server as opposed to the apache server. This made the requests coming from the socket.io javascript file have the same origin as where the javascript file was loaded. Here is an example:
<script src="http://wundertutor.com:8000/socket.io/socket.io.js"> </script>
(node server - correct)
vs
<script src="/javascripts/socket.io.js"></script>
(apache server - wrong)