CSS or Javascript is not showing up on apache web server - javascript

So I am importing all of my website files onto my server and it is displaying the index.html as plain text and some basic images but no CSS or no JavaScript. I am running linux command line on putty connecting to my web server and I have no clue how to fix this, I have played and changed all permissions on the files also.

You have errors on your page for your JS and CSS file paths. Track down this issue.

Related

WebGazer.js unexpected end of input

So I'm trying to play around with WebGazer but I'm already stuck at loading the js file. The webgazer.js file consists of 140k line of codes, but when I load my page the js file only loads until line 94k.
I don't want to use NPM cause it's causing me a lot of hassle to install & run the NPM. How do I fix this problem? Thanks in advance
It seems like when I save the webgazer.js in my project it is not uploaded fully to the server. I had to upload multiple times (3x) in order to fully upload the webgazer.js
I was using PhpStorm and ec2 instance (AWS) for my development server

Can't get any files in the Content & Script folder to load in C# ASP.NET MVC application in VS

Having some problems here with a web application that was checked into a code repository.
Basically, this application in particular will not display any images, .js, or .css which are all located in the Content & Script folders. Only the raw HTML shows while running. This occurs specifically after doing a fresh pull from our code repository and running locally through Visual Studio. When you inspect the files in the console when its running, all the files are completely empty. The console is also giving a ERROR 500 error file not found (IIRC) The files are definitely in the project locally and they are showing in the Solution Explorer.
I am the only one who actively works on development for this application and I don't run into these problems with my machine. When you pull from the code repository on another computer, the problems start. However, no other applications with an extremely similar architecture have this problem after pulling fresh for the repository. I tried creating brand new web applications with exact same settings and files on the computers affected and they loaded perfectly.
The link to the file looks normal too, it matches with the production server which works.
The application is using bundles and most of the bundles look like this:
bundles.Add(new ScriptBundle("~/bundles/bootstrap").Include(
"~/Scripts/bootstrap.min.js",
"~/Scripts/bootstrap-datepicker.min.js",
"~/Scripts/bootstrap-timepicker.js",
"~/Scripts/bootstrap-confirmation.js",
"~/Scripts/respond.js",
"~/Scripts/bootstrap-select.min.js"));`
bundles.Add(new StyleBundle("~/Content/css").Include(
"~/Content/bootstrap.min.css",
"~/Content/bootstrap-datepicker.min.css",
"~/Content/bootstrap-timepicker.css",
"~/Content/bootstrap-sortable.css",
"~/Content/site.css",
"~/Content/bootstrap-select.min.css"));
Things I have tried:
Adding the .js and .css files in _Layout.cshtml page manually instead
of with bundle.
Replacing all the normal files with .min.js or .min.css and vice
versa
Changing authentication methods for access
Changing permissions on Content Folder
Recreating virtual directory
Using Visual Studio 2017 and 2019
I am stumped, anyone have any suggestions or recommendations? I can answer any questions that arise.
You'll need to commit/push .csproj file as well, this file has link to all your files in the project.

Socket.io client .js file not loading

I'm trying to deploy a socket.io chat in Heroku. The page loads, but the socket.io js file for the client is not getting downloaded, so the chat doesn't work.
Here's images of the console in browser showing the error, the javascript portion of the page itself, and the config code of the server, in that order.
https://imgur.com/a/4YeZh
Am I doing something wrong? Thank you in advance
I think there is, a problem in referencing socket.io file, beacuse all of your js files, are references from js directory, but socket.io file is directly referenced.

Not able to read javascript files through localhost

I have Ubuntu 15.04 and i am working on a project using bootstrap i have kept the files in "/var/www/html", none of my files are able to access the javascript files when the page is rendered from Localhost. But I have tried to render same file from a desktop or home the Javascript files work fine.
You Should open the .html files using from a server like if you are using apache you can use localhost/yourfilepath.html. Otherwise External JS files will not open.

Can i run a php file or a html file in a node js web server?

Maybe it's a stupid question but i am a newbie using node js, and I think that it can be used just with js files, I dont know, I installed node js on my windows and i started the web server but i dont know how to run the files, I have always worked with apache, I saw there is a folder called scrips in the node js installation folder
but i dont know how to run the files, I have always worked with apache.
In NodeJS, it's either you write the web server (it's like writing Apache itself), or use a framework that does it for you (it's like adding in something like Apache). Suggesting you check out Express. It's something almost close to CodeIgniter (writing points of entry).
Can i run a php file or a html file in a node js web server?
NodeJS is for JS. Your server files are all in JS. As for HTML, checkout Express (mentioned above), or if you just want to serve plain HTML (or static files), you may want to check out Connect Static

Categories