Mac OSX comes bundled with Apache, however it is deactivated. You might have activated it somehow. In my case, I have previously install XAMPP and configured something in the /etc/apache2/httpd.conf
that leads my port localhost:80
to leads to html page with It Works!
.
TLDR, the solution is to deactivate the Apache2 server.
Go to your terminal, and type this
sudo apachetl -k stop
In my case, it returns the following:
AH00558: httpd: Could not reliably determine the server's fully qualified domain name, using Shafies-MacBook-Pro.local. Set the 'ServerName' directive globally to suppress this message
httpd (no pid file) not running
if you typed localhost
on your browser, the port 80 is not active anymore and you will not see It Works!
anymore.
For context, I have deleted XAMPP long time ago and not aware that my localhost:80
is still active. I am not able redirect dummy domain -- posts.com
to my localhost port for my kubernetes YAML config files.
This is my ingress-srv.yaml
file:
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
name: ingress-srv
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/use-regex: 'true'
spec:
rules:
- host: posts.com
http:
paths:
- path: /?(.*)
backend:
serviceName: client-srv
servicePort: 3000
and I have tricked the operating system to redirect my posts.com
to localhost:80
by adding below line in the hosts file located at /etc/hosts
127.0.0.1 posts.com
by SM
http://localhost
in your browser (on the same machine of course)? – Tawannatawdry