forward cp.domain.com to DA

mikelato

Verified User
Joined
Jan 25, 2010
Messages
74
I followed this article to forward webmail.domain.com to squirrelmail.
http://help.directadmin.com/item.php?id=92

I am trying to set up a few more of these default pointers using this method. I would like cp.domain.com to forward to https://www.domain.com:2222

The virtualhost I put in for this is

<VirtualHost |IP|:80>
ServerName cp.|DOMAIN|
ServerAdmin |ADMIN|
DocumentRoot https://ww.domain.com:2222 CustomLog /var/log/httpd/domains/|DOMAIN|.bytes bytes
CustomLog /var/log/httpd/domains/|DOMAIN|.log combined
ErrorLog /var/log/httpd/domains/|DOMAIN|.error.log
</VirtualHost>

When I go to cp.domain.com it brings me to the "apache is running on this server" message

I am assuming my setup is incorrect, what am I doing wrong and how do I fix this?

Thanks,
Mike
 
hmmm, i already tried that and i had an issue with apache starting. I'll give it another shot, thanks your for response.
 
Ok so I followed this article but I am running into an issue...

It's a job for mod_proxy. Read here:

http://help.directadmin.com/item.php?id=84

When I add the following two lines to my httpd.conf I get an error when I try to start httpd...

LoadModule proxy_module modules/libproxy.so
AddModule mod_proxy.c

Starting httpd:
Apache 1.3 configuration directives found
please read @docdir@/migration.html
[FAILED]

I removed the LoadModule line because it is already built-in to my build but when the AddModule line is in it gives me that error.

httpd -v
Server version: Apache/2.2.11 (Unix)
Server built: Jul 4 2009 23:22:42

Any ideas?

Thanks,
Mike
 
Correct me if I'm wrong but I am not seeing where that link will help me?

The problem is loading the module...

AddModule mod_proxy.c

Not how to use its directives?

I apologize for being ignorant but I just don't know exactly what I am doing with this or why I am getting the error. I need to know what to put in the httpd.conf file in order to load the module. The knowledgebase artible gave the the directives for the virtualhost file but I just can't seem to get the module to load without that error.

Thanks again,
Mike
 
Also, if it helps, my server is running all of the sites I am trying to forward in SSL (cp.domain.com, billing.domain.com, and email.domain.com).

If someone could please "rewrite" or modify that KB article to work for apache 2 and the setup I am trying to configure I would really appreciate it.

I am doing research on my own but I seem to be getting no where.

Thanks again,
Mike
 
Mainly the link above was for Peter. The link proves, the module is supported by Apache 2.x. Sure it must be compiled for specified apache.

Secondly, if you browse the site, to which I've given the link, you'll definitely find solution.

'AddModule' is no used anymore with Apache 2.x. That's what the error "Apache 1.3 configuration directives found" is saying.

Try using simple:

Code:
LoadModule proxy_module modules/libproxy.so


UPD:

Perhaps, you'd better use mod_ssl, if you want to use secure https://cp.domain.com/

Apache's proxy features are divided into several modules in addition to mod_proxy: mod_proxy_http, mod_proxy_ftp, mod_proxy_ajp, mod_proxy_balancer, and mod_proxy_connect. Thus, if you want to use one or more of the particular proxy functions, load mod_proxy and the appropriate module(s) into the server (either statically at compile-time or dynamically via the LoadModule directive).

In addition, extended features are provided by other modules. Caching is provided by mod_cache and related modules. The ability to contact remote servers using the SSL/TLS protocol is provided by the SSLProxy* directives of mod_ssl. These additional modules will need to be loaded and configured to take advantage of these features.
 
Last edited:
I tried browsing the site for a solution but I am not having any luck which is why I am here.

I have tried just using the loadmodule line but that line is not necessary since it is already built in...

service httpd restart
Stopping httpd: [ OK ]
Starting httpd: [Mon Dec 20 00:47:10 2010] [warn] module php5_module is already loaded, skipping
httpd: Syntax error on line 21 of /etc/httpd/conf/httpd.conf: module proxy_module is built-in and can't be loaded

This problem is really holding me back and a solution would be amazing. Thanks again for everyone's help!

-Mike
 
Back
Top