[SOLVED] telnet to port 80 in CPANEL gives access to wrong account
I have a VPS server running CPANEL, and I am trying to write a C++ program to interract with my web site. What I need to do is download a PHP file where the URL contains data I'm sending to the site, and the contents of the downloaded file is the data received from the site.
This all currently works on my Ubuntu test box.
However, when I upload the PHP script into my VPS server, and change the C++ script to access the new URL, it appears to access the wrong user account.
I can simulate this using TELNET ...
telnet www.mydomain.com 80
GET
gives me the listing of files for rootaccount.mydomain.com
what I'm trying to get is the files for www.mydomain.com
When I access the site through a web browser, everything works as expected (retrieving files from www.mydomain.com).
Any suggestions? Is there a command I can issue to TELNET to access the right account? How do web browsers go about accessing the correct data?
I have noticed that this appears to be a common situation for a lot of CPANEL websites I have encountered.
[edit] Before anyone asks ... The C++ program cannot be run from the VPS host, as it relies on a hefty GPU (video card) to perform image analyses. Just thought I'd mention that as I asked this in another forum and the thread became hijacked by a discussion of doing everything through PHP on the server, which isn't really an option.
I have a VPS server running CPANEL, and I am trying to write a C++ program to interract with my web site. What I need to do is download a PHP file where the URL contains data I'm sending to the site, and the contents of the downloaded file is the data received from the site.
This all currently works on my Ubuntu test box.
However, when I upload the PHP script into my VPS server, and change the C++ script to access the new URL, it appears to access the wrong user account.
I can simulate this using TELNET ...
telnet www.mydomain.com 80
GET
gives me the listing of files for rootaccount.mydomain.com
what I'm trying to get is the files for www.mydomain.com
When I access the site through a web browser, everything works as expected (retrieving files from www.mydomain.com).
Any suggestions? Is there a command I can issue to TELNET to access the right account? How do web browsers go about accessing the correct data?
I have noticed that this appears to be a common situation for a lot of CPANEL websites I have encountered.
[edit] Before anyone asks ... The C++ program cannot be run from the VPS host, as it relies on a hefty GPU (video card) to perform image analyses. Just thought I'd mention that as I asked this in another forum and the thread became hijacked by a discussion of doing everything through PHP on the server, which isn't really an option.
Last edited: