Closed blazejpawlak closed 11 years ago
Sorry.. don't know enough about nginx
It appears to be related to those two iptables rules
iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 80 -j DNAT --to 172.y.y.y:8080
iptables -t nat -A PREROUTING -i venet0 -p tcp --dport 443 -j DNAT --to 172.y.y.y:8443
It applies to any webserver running on the same machine and hosting on ports 80 and 443.
Uhm, it seems that this can be easily fixed if one has a server with more than one public IP. The you could do:
iptables -t nat -A PREROUTING -i venet0 -p tcp -d 173.x.x.x --dport 80 -j DNAT --to 172.y.y.y:8080
iptables -t nat -A PREROUTING -i venet0 -p tcp -d 173.x.x.x --dport 443 -j DNAT --to 172.y.y.y:8443
Where 173.x.x.x
is server's another public IP. The one that was used for DNS configuration.
Other public IP has to be used for web hosting.
Perhaps there is room for improvement in the sniproxy configuration.
Should it still be possible to host a web server serving port 80 and 443? I had nginx running and after applying iptables rules the web server sized to be available.