Solved Nginx reverse proxy problem with subdomains
-
What happens if you disable SELinux and firewalld?
-
@johnhooks said:
What happens if you disable SELinux and firewalld?
The nginx proxy can reach the internal IP and port as noted above.
The external ports 80/443 and port forwarded to the nginx proxy.
6 domains are currently currently on the same server are daerma.com and all work perfectly. All of the working proxied domains are only domain.com and www.domain.com redirecting to 80/443 on a single internal IP
-
7 sites now. I forgot about jaredbusch.com and just added another conf file.
-
This post insinuates that I should not need to do anything else to reroute.
http://mangolassi.it/topic/5470/reverse-proxy/15
As well as my google searching
-
Ya that's weird. The only time I've ever got a 502 is when either PHP-FPM isn't running or node isn't running.
What do your nginx logs say?
-
@johnhooks said:
What happens if you disable SELinux and firewalld?
selinux.....
did not think about that.. I was not doing anything special.
setenforce 0
and they work. -
@JaredBusch said:
@johnhooks said:
What happens if you disable SELinux and firewalld?
selinux.....
did not think about that.. I was not doing anything special.
setenforce 0
and they work.Ya I don't understand how it's determined which ports are allowed through SELinux and which aren't.
-
@johnhooks said:
@JaredBusch said:
@johnhooks said:
What happens if you disable SELinux and firewalld?
selinux.....
did not think about that.. I was not doing anything special.
setenforce 0
and they work.Ya I don't understand how it's determined which ports are allowed through SELinux and which aren't.
right. so now to learn that because i like not setting permissive
-
You should be able to do
semanage port -a -t http_port_t -p tcp 4567
Then if you do
semanage port -l | egrep '(^http_port_t)'
it should output the list of ports with that context
http_port_t tcp 80, 81, 443, 488, 8008, 8009, 8443, 9000
-
If it says 4567 is already assigned a label you can change it to:
semanage port -m -t http_port_t -p tcp 4567
Then if you do the port list it should show up in there.
-
@johnhooks said:
semanage port -m -t http_port_t -p tcp 4567
I had to add
semanage
first but then it worked.