PHP Website - Invalid Response - Redirected Virtual Machine

General discussions related to php

Moderators: egami, macek, gesf

Post Reply
New php-forum User
New php-forum User
Posts: 1
Joined: Mon Dec 25, 2017 8:01 pm

Mon Dec 25, 2017 8:14 pm

Hi there...

Im running a couple sites that are open source off git hub... these sites reside on a Virtual Machine on a server

I have subdomains setup to forward to the website IP address and a diffrent port: for instance... ---->> <websiteip>:82

I then have portforwarding setup so that port 82 routes to the virtual machines ip address on port 80 where the website is hosted for example <wanip>:82 -->> <vmIP>:80

all of this works well, and is standard practice that ive done for years...

My problem is that the website has a login feature, when users click login it loads and then presents the following error:

Google Chrome users get "website has sent an Invalid Response"
Firefox Users get : " Corrupted Content Error" The site at http://WEBSITEIP:82/index.php?page=login has experienced a network protocol violation that cannot be repaired.
IE Users get : "Cannot Reach this page"

If you press F5 or hit refresh the page comes right up and your logged in correctly, but normal users dont know to hit F5, and this is a problem

i have tested this with the sites internally on the network, and everything works fine on all 3 browsers, the moment that you make requests from wan addresses it messes up.

I have even tested this on a direct connection to a VM machine and it is working correctly, so i believe the problem is with the redirect entirely.

The Virtual Machines are running Ubuntu 16 and apache2 and there sites are setup properly for virtual hosts on the correct ports.

i belive its a setting in PHP page headers or in apache2... but i dont know where to start...

Any help would greatly be appreciated...

TL:DR : PHP pages gives error when logging in, is fine if you press f5, works fine behind lan, dosnt work behind wan with routing to VM's

Post Reply