Hi Guys ,
i would like to get acces to local vm from outside exemple sub.domaine.com ==> proxmox-VM LOCAL-IP-3:80 ,
I made some config on my external apache proxy as you can see :
& also i made a modification on Proxmox network file as you can see :
the problem i have that the Odoo instances work fine but for the moodle instance doesn't work , do you have any idea about the issue ?Thank you in advance .
NB :
VM Odoo work fine from outside
VM Moodle doesn't work from outside ( it's work from local network http://local-ip/moodle/login/index.php )
i would like to get acces to local vm from outside exemple sub.domaine.com ==> proxmox-VM LOCAL-IP-3:80 ,
I made some config on my external apache proxy as you can see :
Code:
EXTERNAL APACHE PROXY (Public IP -178.xx.xx.xx) : /etc/apache2/sites-available/
<VirtualHost *:80>
ServerName sub.domaine.com
ProxyPass / http://PROXMOX-PUBLIC-IP:80/
ProxyPassReverse / http://PROXMOX-PUBLIC-IP:80/
ProxyPreserveHost On
#RewriteEngine on
#RewriteCond %{SERVER_NAME} =sub.domaine.com
#RewriteRule ^ https://%{SERVER_NAME}%{REQUEST_URI} [END,NE,R=permanent]
</VirtualHost>
& also i made a modification on Proxmox network file as you can see :
Proxmox (Public IP -198.xx.xx.xx) : /ETC/NETWORK/INTERFACES
########## Routing VM Odoo Instances ##########
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8085 -j DNAT --to LOCAL-IP-1:8085
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8085 -j DNAT --to LOCAL-IP-1:8085
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 8086 -j DNAT --to LOCAL-IP-2:8086
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 8086 -j DNAT --to LOCAL-IP-2:8086
########## Routing VM Moodle Instance ##########
post-up iptables -t nat -A PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to LOCAL-IP-3:80
post-down iptables -t nat -D PREROUTING -i vmbr0 -p tcp --dport 80 -j DNAT --to LOCAL-IP-3:80
the problem i have that the Odoo instances work fine but for the moodle instance doesn't work , do you have any idea about the issue ?Thank you in advance .
NB :
VM Odoo work fine from outside
VM Moodle doesn't work from outside ( it's work from local network http://local-ip/moodle/login/index.php )