deploy war into NGINX - nginx

I need to host a java application on an NGINX server instead of on Tomcat7(current configuration), as the application is just a light-weight parser working as a data acquisition service for a sensor based device.
I know that deployment of war files is no-go on NGINX,so please suggest steps to port the application server from Tomcat7 to NGINX.

Jetty might be the option.
As far as I see it requires no code rewriting, just unpacking the .war file you already have.

Related

ASP.NET Core no HTTPS after publishing to file system and transfer to other machine

Like the title says I publish my ASP.NET Core API to the file system on the PC I developed this application on. If I run this published version HTTPS is working fine. When I transfer the published folder to another machine though, HTTPS is not available anymore. Is there anyone that can help me with this problem?
According to your description, I suggest you could firstly check the https port is opened or not.
netstat -aon
If you find the 443 port is on using. Then you could check the pid. By using task manager.
If the process is not IIS or asp.net core process, you could end that process and restart the asp.net core process. Then it will work well.

Can not log into alfresco community edition after power failure

I was out of town and when I returned my server was off due to a power failure. All systems are functional but I can no longer log into Alfresco Community Edition. I have looked at several forums, but no real solutions.
There are a number of things you need to check before we can help you. These include things like:
Is the server running?
Can you connect to it via SSH?
Do you have a web proxy (like Apache or Nginx) installed?
Can you grep for that process?
Can you hit the web proxy?
Can you grep for the tomcat process?
Do you see anything in the logs?
Can you hit the Alfresco webapp on 8080?
Can you hit the Share webapp on 8080?
Is the database running?
If your content store storage is on a mount point, is the volume mounted?
Can you browse the content store directory?

Java webapp to browse and access local file system

This is not really a programming question, except that the answer may be that I need to program it myself. We have a JBoss deployment, and we want to be able to access the filesystem of the server as the running jboss user with the web browser. Is there an off the shelf Java webapp (.war) that will allow this? I know of the security issues, this is an internal server.

HttpAdapter to JavaServlet commnication

Initially we had the application server as a separate one. The communication to the Application Server from worklight servers using adapters. But currently we are moving the Application Server code to the Worklight's Server folder. We are able to call the java class (Simple java class not servlets) using HTTPAdapter. But it is difficult to communicate with the servlet (which is included in the server folder) using HTTPAdapter. Plese provide any solution?
If I understand correctly, you have put some servlet classes in your Worklight server folder. As they are Java classes they are now visible to your adapters. However servlets to be true servlets must be deployed to a JEE servlet engine, with appropriate configuration. You can deploy Servlets (in a WAR file of their own) as a separate JEE application on the same server as Worklight, but you cannot package them inside Worklight itself.
edited in response to your clarification:
You want to consolidate your servlet application, which is providing data accessed via the worklight adapter onto the same server instance as the worklight server. The Worklight Server is actually a JEE application deployed to one of the supported JEE servers, usually WebSphere Liberty which is supplied with Worklight, and the Worklight Server is in fact packaged as a WAR file. Your Data Provider servlet will also be packaged as a WAR file, all you need to do is deploy that WAR to the Liberty server you are currently using for worklight.
If you are doing this is development in Worklight Studio you can find the relevent folders by looking under "Worklight Development Server". You can drop the WAR into the apps folder and if necessary edit the server.xml to add any extra configuration:
WorklightServerConfig/servers/worklight/server.xml
See: http://www-01.ibm.com/support/knowledgecenter/SSCKBL_8.5.5/com.ibm.websphere.wlp.nd.doc/ae/twlp_dep_war.html
a second edit to try to explain again.
The Worklight Project represents your application, when you deploy to the Worklight Server a WAR file is created let's call this MyApp.WAR, that can be deployed to a WebSphere Application Server, inside Worklight Studio you are automatically given a WebSphere Liberty Profile. That Liberty Profile's configuration can be seen in the Project Worklight Development Server. Key Idea here you have one App Server that Liberty Profile, and you deploy the MyApp.WAR file to create what we usually call the Worklight server, it's the MyApp.WaR that is serving your Worklight console. That WAR file is derived from the contents of your project's server folder, this folder's name is a little misleading it's not the "server" itself it's your project-specific WAR information.
Now in addition you want to run a Servlet you already have packaged as a WAR file, let's call this Data.WAR. The key point is that you need to run Data.WAR on the Worklight Developmennt Server, the Liberty Profile. You are not including this DATA.WAR file into your project's server folder, that would effectively put DATA.war inside MyApp.WAR. Instead all you need to do is put Data.WAR in the Worklight Developmennt Server's apps folder and adjust the server.xml.
So: Step 1. Get Data.WAR running in the Development Server. Verify that from a browser you can call your expected servlet. Note the URL that works. Do not make any attempt to use your adapter until you have verified this.
Step 2. Adjust you adapter to call that URL.

How to separately deploy alfresco share application and alfresco repository on different tomcat server?

Currently, I am deploying both "share.war" and "alfresco.war" on same tomcat server.
So, how can I separately deploy "share.war" and "alfresco.war" on different tomcat servers?
I want to deploy "share.war" on tomcat server 1, deploy "alfresco.war" on tomcat server 2.
If you're looking for a way to embed Alfresco in your application, you should check this old but still mostly valid webinar.
If you want to have a quick start at running Alfresco outside any application container (i.e. directly bootstrapping the Spring context) the FirstFoundationClient sample in the Alfresco SDK is what you need.
This is really much more simple than it seems. Deploy the wars on separate tomcats, and then configure share-config-custom.xml inside /shared/alfresco/web-extension on the Share deployment to point to the Alfresco repository. It's that easy.
From a copy-paste of the official documentation :
You can run the Share application in a separate Tomcat instance from
the instance running the Alfresco WAR. This additional instance can be
installed on the same server as the original Tomcat instance, or it
can be installed on a separate server.
Install a new Tomcat instance on the same server at the original Tomcat instance.
Modify the /conf/server.xml file for the new Tomcat instance:
Change the port number (for example, to 8006) in this line:
<Server port="8005" shutdown="SHUTDOWN">
Change the port number (for example, to 8180) in this line:
<!-- Define a non-SSL HTTP/1.1 Connector on port 8080 -->
<Connector port="8080" ....
Move the share.war file from the original Tomcat /webapps directory to the new Tomcat /webapps directory.
(Optional) Configure the original Alfresco Tomcat deployment.
Start the original Tomcat.
You can use Alfresco supplied batch files.
If you are running the Share Tomcat instance on a separate machine, you must modify the override file in the Share Tomcat web-extension directory:
Open the share-config-custom.xml file.
Change any instance of the server and port to the correct name or IP address of the Alfresco server.
http://yourserver:8080
Save the file.
Start the new Share Tomcat instance.

Resources