bind apache to a specific port.
#1
bind apache to a specific port.
Hi,

i would like to see a way to have a config option to be able to set the generic apache ip to be bound to a certain server ip.
<virtualhost xx.xx.xx.xx:80> and not <virtualhost *:80>

I see its possible to override this in a virtual host override, but i can't find a way to set this in general. Can you please point me where to set this for all vhosts (even if this means i need to override or change a template or script)

regards
J.
Reply
#2
RE: bind apache to a specific port.
in apache main config file you have :

listen 80

http://httpd.apache.org/docs/2.2/bind.html

instead add:

Listen 192.0.2.1:80
No support using PM (Auto adding to IGNORE list!), use the forum. 
How to ask

200$ free to start your VPS 60 days credit
Reply
#3
RE: bind apache to a specific port.
Admin > Sentora Config > ctrl+f > Sentora Apache Port

Also,
Admin > Module Admin > Apache Config > ctrl+f > Apache Port

You have to set the both.
I have Varnish running in front of Apache so that's what I did and it works nicely.
Reply
#4
RE: bind apache to a specific port.
(12-02-2014, 09:29 AM)TheVP Wrote: Admin > Sentora Config > ctrl+f > Sentora Apache Port

Also,
Admin > Module Admin > Apache Config > ctrl+f > Apache Port

You have to set the both.
I have Varnish running in front of Apache so that's what I did and it works nicely.

config settings:
Senotoa Apache Port: 80
Module Apache Port: 80
result:
# Configuration for Sentora control panel.
Listen 80
<VirtualHost *:80>
# DOMAIN: test.domain
<virtualhost *:80>

config settings:
Senotoa Apache Port: yy.yy.yy.yy:80
Module Apache Port: xx.xx.xx.xx:80
result:
Listen yy.yy.yy.yy:80
Listen xx.xx.xx.xx:80
# Configuration for Sentora control panel.
<VirtualHost *:yy.yy.yy.yy:80>
# DOMAIN: test.domain
<virtualhost *:xx.xx.xx.xx:80>

As you can see from the second example this does not result in proper virtualhost entires. I used xx.xx.xx.xx and yy.yy.yy.yy in this example just to show what config field results in which output entry. The Problem ist just the leading "*:" in the virtualhost lines.

This means it is possible to change the port the apache server is running on, but not to limit the ip-address to a single ip address. The only solution would be to change the line in the code that creates the virtualhost entry.

Code:
       $vhostPort = ( fs_director::CheckForEmptyValue( $rowvhost[ 'vh_custom_port_in' ] ) )                     ? $VHostDefaultPort                     : $rowvhost[ 'vh_custom_port_in' ];        $vhostIp = ( fs_director::CheckForEmptyValue( $rowvhost[ 'vh_custom_ip_vc' ] ) )                   ? "*"                   : $rowvhost[ 'vh_custom_ip_vc' ];

Something like adding a VHostDefaultIP would maybe help here. I could do that changes to the code, but thats inside the core of the application and i am sure future updates would break that again. Any suggestions how to go on?

J
Reply
#5
RE: bind apache to a specific port.
This would be really helpful ... the possibility to bind Apache to IP (or even to allocate IPs to clients ...).
Reply
#6
RE: bind apache to a specific port.
I'd like to see this resolved too.

For example, I don't want the control panel to run on port 80 -- so move it to 1080

but I also don't want the default page that comes up when anyone goes to any domain that resolves to the IP of the server, but not necessarily has a vhost configured for it ( including the server's alias that's hosting the sentora cp on port 1080 ) to default show the very first 'user domain' that is added as a vhost by default.

This is what I'm looking for, if ip is x.x.x.x

dom.ain x.x.x.x:1080 sentora cp
dom.ain x.x.x.x:80 static blank page, or something else.
resolvable.but.not.hosted.dom.ain x.x.x.x:80 static blank page, or something else.
resolvable.hosted.dom.ain x:x:x:x:80 valid vhost that brings up correct page
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Sentora & Apache behind Nginx Reverse Proxy Feilding Weather 7 19 ,485 08-06-2021, 02:58 PM
Last Post: ccr1969
Postfix relay specific domains to mailjet johnnyp 0 3 ,043 01-29-2021, 04:44 AM
Last Post: johnnyp
How to run multiple version PHP with Apache (use Sentora panel) on Centos ??? BigBang 4 11 ,475 12-23-2020, 03:31 PM
Last Post: djkashdui1

Forum Jump:


Users browsing this thread: 1 Guest(s)