jbigelow
02-15-2006, 01:42 PM
Hi all,
I currently have plesk installed on a leased server, its accessible through a port number. So if a user wants to get into plesk they have to type https://www.mydomain.com:xxxx what do I have to do to allow them to access plesk via a subdomain subch as https://cpanel.mydomain.com? The DNS service doesn't have anything at all referring to port numbers.
Thanks,
Justin
scooterh
02-15-2006, 02:30 PM
You could setup an ip tables rule similiar to the one below.
/sbin/iptables -t nat -A PREROUTING -p tcp -i eth0 -d freeip1 --dport 80 -j DNAT --to mainip:8443
and point a subdomain to that ip your using, pleasenote that ip can't be used for any sites.
gbjbaanb
02-15-2006, 02:58 PM
On the DA forum someone gave a very good answer: use mod_proxy.
Create a new VirtualHost entry for your site, like this:
<VirtualHost IP:80>
ServerName plesk.domain.com
ProxyRequests Off
ProxyPass / http://localhost:xxxx/
ProxyPassReverse / http://localhost:xxxx/
</VirtualHost>
This will pass all requests for plesk.mydomain.com to the dedicated port.
Put the VirtualHost configuration in the same file as your existing one (or the vhost include file for Plesk, IIRC) so there are 2 entries for port 80, do not put the directives inside the existing VirtualHost block.
jbigelow
02-15-2006, 03:23 PM
Scooter, gbjbaanb thanks for the reply guys, I appreciate the effort. However I failed to mention I am using Win2K3 with the MSDNS service (in retrospect I realize that's a pretty big detail to leave out :) )
Any other suggestions.
Thanks again.
scooterh
02-15-2006, 03:31 PM
i suggest checking plesk forums then
gbjbaanb
02-16-2006, 07:58 AM
Your problem has nothing to do with DNS, but how the webserver deals with url addresses.
If you're running apache on Windows, my vhost trick will still work (fingers crossed)
If you're running IIS... have a look at using IIS Host Headers:
http://support.microsoft.com/default.aspx?scid=kb;en-us;324287