PgAdmin4 website hosting on port 443 (https) - pgadmin-4

For my project i configured the postgresql and pgadmin4 .. but now i want to make the website secure with proper DNS name and run over port 443. DNS is also done but how to make it run over 443 from 80. ie., from http to https. i made changes in httpd.conf file and added certificates required too. but website is not loading ,still the website is opening on http:// ip address but not on https://
I tried making changes in configuration file too
LL be Much thankful.
how to configure pgadmi4 on port 443 https

Related

GET /favicon.icon 404 error in ngrok

On running ngrok and going to the suggested url, i get
GET /favicon.icon 404 error in ngrok.
In which folder does ngrok search for the favicon.ico file ?
How do i fix this ?
Very new to ngrok. Do help me out
Thanks in advance
I ran into a similar problem with URIs from ngrok being served as 404s.
I have a local Apache, PHP and MySQL stack setup on macOS using *.dev domains.
So in my case, I needed to set the host-header option in ngrok to match the hostname of the virtual host Apache was configured for.
Here's the relevant part of my Apache virtual host configuration:
<VirtualHost *:80>
ServerName example.dev
ServerAlias www.example.dev
...
UseCanonicalName Off
</VirtualHost>
The necessary ngrok arguments to tunnel requests to my private development domain were:
$ ngrok http example.dev:80 -host-header=example.dev
What ngrok do is,make tunnels to localhost.That allows you tunnel requests from Internet to your local machine.
You can see following details after running : ngrok http 8888
Tunnel Status
online
Version 2.0.19/2.0.19
Web Interface http://127.0.0.1:4040
Forwarding http://299954c1.ngrok.io -> localhost:8888
Now all the data intended for 'http://299954c1.ngrok.io' url which is publically accessible will come to your local machine at port 8888
You need to have some server running on your local machine at port 8888 which can serve 'favicon.icon' static file
If you are able to get icon by hitting : localhost:8888/favicon.icon in your browser, You will surely get it from http://299954c1.ngrok.io/favicon.icon

tomcat7 + apache2 port 8081 conflict?

Picking up a test system with apache + tomcat. It was supposed to work but has been not working for a while.
If I start Tomcat first, then when starting apache it will show the following error:
[warn] NameVirtualHost *:8081 has no VirtualHosts
(98)Address already in use: make_sock: could not bind to address 0.0.0.0:8081
no listening sockets available, shutting down
If I start Apache first, then start Tomcat, I will see the java exception saying port 8081 has been used already and Tomcat won't start.
What's the correct way to integrate apache2 and tomcat7? Where do I may be missing in the current setup? thanks.
Since port 8081 is not the standard port for Apache to listen to, it must be configured somewhere explicitly. Go through the configuration, find it, and fix it.
Alternatively, you can go though the tomcat configuration, find the port and fix it.
What the fix may be depends on your server setup: Moving it to another port number, disabling it completly, or something different.
A common configuration hides apache tomcat completly behind apache httpd and connects to it via the AJP connector.
You have the apache configure these listening on port 80 and integrate the Tomcat (default ajp port 8009 or default http port 8080) via mod_jk (AJP) or proxypass (AJP or HTTP) to Apache.
Apache (proxypass)
ProxyPass / http://localhost:8080/
ProxyPassReverse / http://localhost:8080/
or
ProxyPass / ajp://localhost:8009/
ProxyPassReverse / ajp://localhost:8009/

Apache 2.4 virtual host on different port than 80

When reading the articles it all seems easy, but I am unable to get this to work. I run apache 2.4.7
Several virtual hosts are running just fine. I need one virtual host to run at port 8080 only. So I added Listen 8080 to ports.conf
In the virtualhost conf file:
VirtualHost *:8080>
After a restart I am not getting the virtual host. I do see the default server page and I also notice that the Listen 8080 line is working.
What am I forgetting?

Why does Nginx give a 502 error only for mobile devices?

Using Nginx, I'm getting the error:
Error 502 - Bad Request
The server could not resolve your request for uri: http://domain.name/file/path
Oddly, I only get this error when my phone is using data from my cell carrier. The server serves everything just fine when I am using my phone on Wi-Fi or when I'm using a desktop computer. It even works when I am using my iPad conneted to my phone via Wi-Fi with my phone acting as a mobile hotspot.
The 502 error code suggests that there's an issue with reverse proxying or serving requests with php-fpm. I'm doing neither of these.
Because this error is happening only under specific circumstances, I'm thinking it has to be something with the request my phone is sending. (Nexus 5, Chrome, Android Lollipop)
My nginx.conf and other configuration files are passing tests. I used:
sudo nginx -t
and it said "the configuration file syntax is okay" and "configuration file test is successful."
What could be going on?
After tripple-checking my Nginx configuration, I had the idea to look at all tcp activity on port 80 of my server.
I installed tcpdump:
sudo apt-get install tcpdump
Then ran it, looking only for port 80 tcp traffic:
sudo tcpdump 'tcp port 80' -i eth0
I noticed that all other traffic was just 'IP', but when I sent a request from my phone, it was 'IP6'.
My server wasn't ipv6 enabled, but that's an easy fix with an additional listen directive:
listen [::]:80;

Connecting a secured websocket on Google Appengine frontend with managed VM with nodejs runtime

I've trouble in connecting to a wss secured socket server via google appengine frontend with managed VM support.
buy default google exposes only port 8080 in docker image google/nodejs-runtime, Even if expose port 8443 in Dockerfile like below i can connect only to http://localhost:8080 not https://localhost:8443
FROM google/nodejs
WORKDIR /app
ADD package.json /app/
RUN npm install
ADD . /app
EXPOSE 8443
CMD []
ENTRYPOINT ["/nodejs/bin/npm", "start"]
Still i can see port 8080 include in the container
"/nodejs/bin/npm start 8443/tcp, 0.0.0.0:8080->8080/tcp
If i log in to my managed vm instance and run the container image with
docker run -d -p 8443:8443 nodejs.default.wss-check:latest
and try
$curl https://localhost:8443
I get curl: (60) SSL certificate problem: unable to get local issuer certificate, It looks like its connecting but i've to use realdomain name
I've created a issue in github aswell https://github.com/GoogleCloudPlatform/appengine-nodejs-quickstart/issues/13, but not that helpful.
Same set up works like a charm in normal compute instance. but it doesn't auto scale.
Any help on this issue will be appreciated.
The reason you can't curl to https on localhost (curl: (60) SSL certificate problem: unable to get local issuer certificate) is because "localhost" is unknown to any CA. You need to run curl -k https://localhost:8443 to get it to ignore the lack of a certificate for localhost.
Looks like currently Google Managed VM supports Websocket connection only on JAVA
Even if you try websocket connection on with nodejs on GMV it defaults to polling transport. if you wanna see this in live you can use set socket transports, deploy to live and look in to console- network and see which transport its using!
socket.set('transports', [
'websocket'
, 'flashsocket'
, 'htmlfile'
, 'xhr-polling'
, 'jsonp-polling'
]);
We have to wait untill google implements websocket support in Managed VM. If anyone get this working on GMV, Please comment here :)

Resources