express static files on cPanel server with phussion passanger - express

I am trying to deploy a node app with Cpanel using the setup node js app tool. The application has been deployed successfully but the static files of my application are broken I am getting a 404 error for my public folder. My hosting server uses Phusion Passanger to manage HTTP requests. Are there any settings I need to provide to add the path to my static files? In localhost it was enough to use: server.use(express.static(path.join(__dirname, 'public')));
But when testing it in production there seems to be some overlap of the passenger configuration with respect to my express server configuration.

Related

Apache Ignite Web Console

I am inside a corporate firewall that does not allow me to access the free deployed instance at https://console.gridgain.com/. I downloaded the source and tried to build but again the firewall does not allow me to go outside the network to retrieve the dependencies specified in the pom.xml file.
What are my options
You can download binary build of Ignite Web Console from Apache Ignite, deploy it on premise.
You can also deploy paid version of GridGain, deploy it on premise.
You can download WebConsole from the GridGain website by the following link: https://www.gridgain.com/resources/download
You can install it in your environment and use without needing to access external resources.

Apache Error While Import .war file. "Error: FAIL - Application at context path [/folder] could not be started"

After deploying the war file from apache server it shows the Running status fail. Then I deploying the .war file its shows error like FAIL - Application at context path [/folder] could not be started. How can I solve this issue and how can I run my war file in Apache server. Kindly guide me to solve this issue.
You need a java server to run war files. A common way to integrate this with Apache is to run your war file in a java server such as tomcat or wildfly, then with apache, reverse proxy to your java server using a virtual host. This way apache works as your gateway interface, then the java server actually handles your logic for your specific application.
Unless you are using Apache Tomcat? If so, please provide more context. What server are using and what are the logs?

Do we need to reboot Apache web server if we update the source code of website it is hosting?

Well I am not an expert on Apache or any web server, I have recently finished my first web app, so I have rsyncd code to web server /HTML.
The web app is python flask based uses wsgi module to load.
I do not have control over Apache as it's taken care by systems department.
So I cannot test myself in office. I just want to know if we upload updated/modified code to the host machine running apache web server, will it pick up changes or we need to restart the Apache web server?

Apache web server with tomcat

We have a java web application with gradle build configuration which contains 2 modules as below:
project-web.war -- contains all statc files, js, jsp, etc. Also it contains all the project, spring configuration with rest controller layer.
project-main.jar -- contains all the business & DAO layer logic.
Currently we are deploying both of these modules in Apache tomcat. Our project is going through with some architectural changes & one of the requirement is to add all the static content in Apache server so that static content can be served quickly.
I am beginner in regard to Apache http web server. I have below questions:
If I put all the static contents in Apache http server, then can I remove all the static contents from project-web? Can both of these project exist separately?
Going forward static content of project will be in Apache http web server and web app will be deployed in Apache tomcat, in addition both of these server will be in different VM machine. How web app in tomcat can access static content from Apache web server in different VM machine?(E.g. how jsp can point to images?)
Would it be fine idea to create a separate project for just static content as it will independent of web project in future and just need to be deployed in Apache http server?
Answers for above questions will be appreciable & other related suggestions are also welcome. Thanks!
1) If I put all the static contents in Apache http server, then can I remove all the static contents from project-web?
Yes.
Can both of these project exist separately?
They can, but the stuff in the webapp will (should) never be accessed so what would be the point?
2) Going forward static content of project will be in Apache http web server and web app will be deployed in Apache tomcat, in addition both of these server will be in different VM machine. How web app in tomcat can access static content from Apache web server in different VM machine?(E.g. how jsp can point to images?)
The webapp doesn't need to access the images. The browser needs to access the images. The Apache HTTPD configuration can be set up to take care of that transparently without requiring any JSP changes.
3) Would it be fine idea to create a separate project for just static content as it will independent of web project in future and just need to be deployed in Apache http server?
Yes.

Setting up tomcat6 using mod_jk for Apache, page not found using https

I have been trying to setup an Apache web server along with a Tomcat6 web server, using SSL/HTTPS. On my Apache web server the SSL is working correctly, and I can access the web pages it serves up using SSL/HTTPS, but I am having a problem accessing the web apps on the Tomcat server using SSL/HTTPS. The new setup is on a Centos 6 machine, and I have a similar setup on a Fedora 13 machine.
I have compared all the files that I can think of between the two machines, but can not get to the web apps using HTTPS. When I try I get a "Not Found" error. I can access the web apps if I use just HTTP.
Can anyone point me to where my problem might be?
Thank you