Hi Michael, I enabled nginx as an SSL proxy as you suggested, it partially worked, I can do a http://xxx.xxx.xxx.xxx/test.php and it will run fine, but when I do https://xxx.xxx.xxx.xxx/test.php it's looking in /var/www/html/test.php according to the ngnix error.log and returning a file not found.
So Apache is now doing what I want, but nginx is not. What I am trying to do is debug a 5107R site which was written by a php developer that has fallen off the radar since the pandemic started, so I can migrate it to a 5209R or 5210R server. There are a ton of depricated php function calls. So I can't take the client's site offline whilst I wade through them, hence I made a copy of the live site, put it on it's own static IP, and I am trying to patch the old code to bring it up to current php compatibility. - Ernie. > Hi Ernie, > > > I am trying to access a vsite, which has been assigned it's own static IP > > which is different from the server IP, by using just the IP address. > > > > eg. http://xxx.xxx.xxx.xxx/test.html > > > > It's a 5209R server, and it's always trying to get to > > /var/www/html/test.html when I use the IP address, instead of looking in > > the site1 > > /directory where the page is. > > > > In the past I have never had a problem doing this on 5107R servers, but > > something seems to have changed over the years. > > That is correct. This was eventually changed. If you have multiple > Vsites on the same IP and a client enters the IP, then which page does > he see? Chances are, he sees the page of another client with which his > Vsite shares that IP. > > For that reason /etc/httpd/conf.perl/00-default-vsite.pl was introduced > a few years ago. It's part of the Apache configuration and detects on > the fly which IPs are associated with the server and creates a dummy > VirtualHost container for each of them, which is loaded first and before > any VirtualHost containers of Vsites come into play. > > The DocumentRoot for these dummy-VirtualHosts is /var/www/html/ and > that's what anyone will see when he accesses any IP bound to the server > directly. > > > It's so I can test certain things in a vsite without having to alter DNS > > records. > > > > Is there anyway to achieve this on 5209R servers? > > Enable "Nginx as SSL Proxy" in the GUI. It disables this feature completely. > > Or if you don't want to do that, edit > /etc/httpd/conf.perl/00-default-vsite.pl and find the comment near the > bottom where it says ... > > # Push out config: > $server = Apache2::ServerUtil->server; > $server->add_config([split /\n/, $config]); > > ... and modify it to this: > > # Push out config: > $config = ''; > $server = Apache2::ServerUtil->server; > $server->add_config([split /\n/, $config]); > > -- > With best regards > > Michael Stauber > _______________________________________________ > Blueonyx mailing list > Blueonyx@mail.blueonyx.it > http://mail.blueonyx.it/mailman/listinfo/blueonyx _______________________________________________ Blueonyx mailing list Blueonyx@mail.blueonyx.it http://mail.blueonyx.it/mailman/listinfo/blueonyx