Forum

Images are not displayed in wordpress using reverse proxy with Binding setting

Akash talole
29 January 2016, 14:44
Binding {
BindingId = Bind1
Port = 443
Interface = 0.0.0.0
MaxKeepAlive = 100
SSLcertFile = /usr/local/etc/hiawatha/serverkey.pem
MaxRequestSize = 100000
MaxUploadSize = 550
}

I use this binding setting for wordpress site using reverse proxy but images are not loading. withoud binding id it shows images. What is the problem??
Akash Talole
29 January 2016, 17:35
This is my binding setting
Binding {
BindingId = Bind1
Port = 4434
Interface = 0.0.0.0
MaxKeepAlive = 100
SSLcertFile = /usr/local/etc/hiawatha/serverkey.pem
MaxRequestSize = 100000
MaxUploadSize = 550
}

Binding {
BindingId = Bind2
Port = 443
Interface = 0.0.0.0
MaxKeepAlive = 100
SSLcertFile = /usr/local/etc/hiawatha/dev.pem
MaxRequestSize = 100000
MaxUploadSize = 550
}

Binding {
BindingId = Bind3
Port = 80
Interface = 0.0.0.0
MaxKeepAlive = 100
MaxRequestSize = 100000
MaxUploadSize = 550
}

and this is virtual host setting
VirtualHost {
RequiredBinding = Bind1
Hostname = web1.com
WebsiteRoot = /var/tmp
ReverseProxy ^/.* https://1.2.3.4:4433/ 3600
TLScertFile = /usr/local/etc/hiawatha/web1.pem
PreventSQLi = yes
PreventXSS = yes
PreventCSRF = no
}

VirtualHost {
RequiredBinding = Bind2
Hostname = web2.com
WebsiteRoot = /var/tmp
ReverseProxy ^/.* https://1.2.3.4:443/ 3600
TLScertFile = /usr/local/etc/hiawatha/web2.pem
PreventSQLi = yes
PreventXSS = yes
PreventCSRF = no
}

VirtualHost {
RequiredBinding = Bind3
Hostname = web3.com
WebsiteRoot = /var/tmp
ReverseProxy ^/.* http://1.2.3.4:80/ 3600
PreventSQLi = yes
PreventXSS = yes
PreventCSRF = no
}

in this case website css design are not loading
Hugo Leisink
30 January 2016, 09:59
Perhaps Wordpress is creating links to images that doesn't contain the right port number?
Akash Talole
1 February 2016, 08:11
But images are shown when there is no bindingID and Requiredbinding
Binding {
Port = 4434
MaxKeepAlive = 100
SSLcertFile = /usr/local/etc/hiawatha/serverkey.pem
MaxRequestSize = 100000
MaxUploadSize = 550
}
Hugo Leisink
1 February 2016, 08:22
Yes, that's problably because the images point to a different virtual host. With the RequiredBindings set, the images can't be loaded due to access restrictions.
Akash Talole
2 February 2016, 07:10
Problem solved by setting wordpress Default Site URL same as the virtualhost Hostname in wp-config.php
Hugo Leisink
2 February 2016, 09:51
Well done.
This topic has been closed.