I tried to run Nodejs app on cPanel. I saw YouTube tutorial and in YouTube everyone is running fine with hello world message, but when I apply same step( step as below), I get 404 error? where am I missing?
steps I followed
I went to cPanel and to Nodejs setup
I filled up empty spaces as below screenshots.
and when I click the link i am getting 404 error.
do I also need to add .htaccess file?
also I tried package.json file.
Related
Ubuntu 20.04
Apache 2.4.41
phpmyadmin 4.9.5deb2
I can log in to phpmyadmin and see the main page where the databases are listed in the left-hand panel. But I get an error message. Using F12, I see the following error:
Failed to load resource: the server responded with a status of 403 (Forbidden) config.js:1
There is a config.js file under /usr/share/phpmyadmin/js. There are other js files in that folder that are included in the sources listed in the browser (again, using F12).
I confirmed that the config.js file has read permissions set for everyone. All the js files in that folder have the same permissions set.
I also confirmed that /etc/apache2/conf_enabled/phpmyadmin.conf links to /etc/apache2/conf_available/phpmyadmin.conf and that links to /etc/phpmyadmin/apache.conf. Neither this apache.conf nor /etc/apache2/apache2.conf deny access to config.js.
When I delete config.js, I do not get the error BUT I get other errors concerning functions that are contained in that config.js (like "Uncaught ReferenceError: isStorageSupported is not defined."). This tells me that the forbidden file is indeed this file. I renamed it and created a new empty config.js - still get the same forbidden error(fwiw).
We've been using phpmyadmin on this server since April. The error has cropped up in the last couple weeks. When I ssh'd into the server this week, it displayed a message that it needed restarted to make updates. I did not know there were auto-updates going on. I restarted, which did not help the problem. Then I updated and upgraded everything but still no help. I uninstalled (remove and purge) and installed phpmyadmin, but still no help.
My next step would be to upgrade phpmyadmin to the latest stable using a different repository (the debian repo is a little behind). But I thought I'd ask here because I have a feeling that might not help either.
I'm thinking that something changed in the server stack that isn't allowing the config.js file to be read; I just have no idea what that would be. Has anyone else seen this or something similar?
I implemented a band-aid: I copied the /usr/share/phpmyadmin/js/config.js file to config.1.js. I edited the code in /usr/share/phpmyadmin/libraries/classes/Header.php to use config.1.js instead of config.js.
No error now!
But I don't like this answer because it doesn't tell me what the original source of the problem is and how to keep it from happening again.
im trying to run a nodejs server on godaddy using the cpanel thing. i followed this tutorial, and got to the part where you run the server file. however, the server gives me a permission error.
there may be something wrong with my file structure, or the tutorial may be out of date, as my file structure differed from that in the tutorial. ex: tutorial said to go to /home/username/public_html, but my public_html folder is located on the root folder.
Update:
i just found that i could change file permissions, and enable the execute option on the node file. i'm now getting a segmentation fault error
if you need any extra information, let me know.
I am trying to deploy my portfolio using Heroku and the web only has an HTML file, a CSS file, and a simple javaScript file. screenshot of all my files are here
I pushed all of these files to Github and linked them to Heroku. Heroku deployed successfully but as I opened the URL, it gives me an application error with code H10. I googled a lot of fixes and tried adding a Procfile file but none seems to have worked. Can Anyone help me with this issue?
You need to know that heroku is not designed to post static websites. Nevertheless if you still would like to upload static website you need to organize your structure to somehow trick Heroku to see your files as an application.
Add composer.json root directory by adding {} inside, and index.php to the root directory,in index.php, add the following line: <?php include_once("home.html"); ?>, change your index.html to home.html. Push them to heroku, now it should work.
I am running NodeJS on one of my subdomains on plesk panel.
I set the application directory and startup file correctly but when I open the subdomain url on my browser, I get a 404 error which says page not found.
In my logs, I see this error
.732 [INFO] [188.158.19.112:8597] Index file is not available in [/var/www/vhosts/domain.com/hello-world/public/]
It seems that it is looking for index file instead of running the NodeJS app.js file
To start I'm not a coding expert so excuse me if this was a newbie question.
I have installed a nodejs app into my VPS (digital ocean), after uploading everything (both server side and client side) seem to be running but I'm having an issue.
The dependencies are managed using bower so installed everything in the root directory of Apache server. As I use the "Inspect Element" in my browser to see
the console I get a first error of:
http://104.131.66.68/manager/bower_components/socket.io-client/dist/socket.io.min.js Failed to load resource:
the server responded with a status of 404 (Not Found)
I checked the bower_components folder in my server and the folder socket.io-client exists! But when I checked through my browser to see the source files it is not there! Other dependencies are available.
These are the errors that appear, the socket.io error at the top most i suspect the reset are due to the same problem and lastly is the API Key (i intend to handle that after this).
your help is highly appreciated!!
Thank you
<script src="/socket.io/socket.io.js"></script> use this to serve the socket.io client. If it does not work, you are having something wrong somewhere.