I am using node.js server and implemented socket.io.
It works fine, but for some reason, I have to use Apache Tomcat, running on port 8080, and the node server running on 8081.
If I run the application via :8081 (serving pages through node.js), socket.io (socket.io is listening to 8081 port) is working, but when I serve through Apache Tomcat running application via :8080/Demo_Pro/index.html, socket.io is not working.
Can anybody explain how to run both Apache Tomcat and node.js at the same time.
You should look on google on how to host node.js and apache at the same time. You'll find that you'll have to use mod_proxy to proxy requests through apache. (node.js needs to be on another port). Look at this link: how to put nodejs and apache in the same port 80. It'll give you an idea on how to do it.
Related
I am creating a website, which will have two subdomains: texts.example.org and users.example.org
texts.example.org is written in PHP on Apache.
users.example.org is written with express.js.
On a normal server, this is fine. However, I want to be able to run this on my local machine (Windows 10) as well.
I setup subdomains in .../etc/hosts:
127.0.0.1 texts.localhost.local
127.0.0.1 users.localhost.local
However, I can't have both Apache and Express.js listening to the same port. How do I tell Apache to only respond to requests for texts.localhost.local, and tell Express to only respond to requests.localhost.local, while sharing a port?
I installed gitlab-ee on my ubuntu 16.04 server hosted with AWS. I am not able to launch gitlab using the external url that is mentioned in gitlab.rb file. I have apache as default webserver. I used a subdomain as external url. But when i launch that url, it is still landing on default apache page and not using nginx to launch gitlab. How to solve this issue?
Apache and Nginx will probably try to use the same ports (80 & 443). The first started, in your case Apache, will start normally, but the second will not initialize properly as two programs can not listen together on the same ports.
Confirm with the command sudo gitlab-ctl status nginx. This will return the status of the integrated nginx instance.
If it is stopped, stop apache and then start nginx using sudo gitlab-ctl start nginx.
I have a web application that's running inside a docker container.
It's written in Play Framework. My host is an Ubuntu 16.04 server with apache. Docker application use the nginx server. The port 443 is directed to that container. SSL in my Apache server is turned off. Now when i try visiting my domain with https the browser give the warning which is annoying.
So i got some free certificates from sslforfree.com and used it with the docker application but still the warnings come up. Do i need to use those certificates in the apache server too?
Yes.
Your browser speaks with Apache server trying to establish an SSL communication at first, then Apache will try to forward the request to your docker container.
So, indeed, it's only mandatory to secure your Apache instead of the container to have the browser not complaining.
I am using tomcat on Linux centOs server. I want my java application is working fine on mydomain.com:8080. I want that my when some one hit the domain mydomain.com it automatically move to my java application.
Changin server.xml didm't worked for me. as i am also having apache2 on the server
I guess you have an apache server in port 80. I you do not want to remove apache and change directly the tomcat port ( see comments), you will need to redirect all traffic from port 80 to port 8080.
This can be done using tomcat connectors. They are plugins to connect web servers with Tomcat. When a HTTP request arrives, the plugin checks is it has to be redirected, connects to tomcat and returns the response to server
In the case of apache is needed to install mod_jk. In the link you can see the configuration
I've got Apache and passenger on my notebook. I want to test Nginx and passenger on the same machine. I can install Nginx on 8080 and apache on 80. But can I install passenger with both the same server on the same machine?
Yes, simply install the apache module and then the nginx module. You'll probably need to make sure each server has a different PassengerTempDir setting too.
I had both Apache and Nginx with passenger installed and working fine on the same Arch Linux machine, serving a Rails app. Once, with apache running and listening on port 80, I started nginx listening on the same port and got an (expected) error about the port being already bound. I stopped apache and nginx, restarted nginx and started getting Bad Gateway errors whenever I tried to access the Rails app under Nginx. I still haven't figured out what the problems is and how to fix it. Rebooting doesn't seem to help.