Page 1 of 1

how to open a certain port with a wildcard on a subdomain ?

Posted: 2011/03/02 11:04:34
by nkos
Hello,

Via Plesk I created a sub-domain. Naturally it created with the port 80 by default.
I created a vhost.conf in/var/www/vhosts/domaine.fr/subdomains/s to ous.domaine.fr / conf / vhost.conf
I wish to reach it via a particular port, let's say: 8080 and also with a wildcard:
*.sub.domain.fr:8080 (1.sub.domain.fr:8080, 2.sub.domain.fr:8080)

In my vhost.conf, I put:

[code]
ServerName sub.domain.fr:8080
ServerAlias sub.domain.fr:8080
ServerAlias *.sub.domain.fr:8080
ProxyPass / http://sub.domain.fr:8080/
< Proxy * >
Order Allow, Deny
Allow from all
< / Proxy >
< Directory / >
Options FollowSymLinks
AllowOverride None
< / Directory >
[/code]
In my parameters DNS under Plesk, I have:

[code]
sub.domain.fr A xx.xx.xx.xx (the IP address of my server)
*.sub.domain.fr CNAME sub.domain.fr
[/code]
It works with sub.domain.fr:8080, but not when I want 0.sub.domain.fr:8080, 1.sub.domain.fr:8080 ... :-?

I know that I have to open the 8080 port but how ?
Is my vhost.conf file is correct ??

Thanks a lot

[Moderator edited to insert [i]code[/i] tags to preserve the formatting.]

Re: how to open a certain port with a wildcard on a subdomain ?

Posted: 2011/03/02 15:12:17
by nkos
need help
thanks :-)

how to open a certain port with a wildcard on a subdomain ?

Posted: 2011/03/02 21:50:32
by pschaff
[quote]
nkos wrote:
need help
thanks :-)[/quote]
Welcome to the CentOS fora. Reading [url=https://www.centos.org/modules/newbb/viewforum.php?forum=47]FAQ & Readme First[/url] is recommended for new users. In particular, please see Section 11 of [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14274&forum=47]Readme First[/url], the Documentation link in [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=14273&forum=47]Where to Find Answers[/url], and [url=http://www.centos.org/modules/newbb/viewtopic.php?topic_id=25128&forum=47]How to provide information about your system[/url].

Among other things that should lead you to
http://www.centos.org/docs/5/html/Deployment_Guide-en-US/s1-apache-virtualhosts.html

If the DNS configuration in Plesk does not propagate the information to the wider world configuring it locally will not help you. We have no way of knowing about that here.

As far as opening the port[s] in the firewall after you have things configured correctly, system-config-securitylevel should do the trick.

Plesk is notorious for doing things in a non-standard way. See:
[url=http://wiki.centos.org/AdditionalResources/OtherVoices]Other Voices[/url]
[url=http://wiki.centos.org/TipsAndTricks/BrokenSpins]When CentOS Is Not CentOS[/url]

If the above fails to help, you should consult their [url=https://www.parallels.com/support/plesk/form/]support[/url].