Hi all
got a bit of a problem on my hands i was trying to make a redirect where if any of my hosts type in webmail.* it would automaticaly redirect to https://webmail.myhost.co.za:2096 but for some or other reason it wouldnt work and now when i try to put everything back to the way it was all of it is broken so now when they enter webmail. it redirects to the cgi-sys/default and i cant get it to redirect to the original webmail login page....
httpd.conf :
End of httpd.conf
I have remove IP and server name for security reasons... respectively...
got a bit of a problem on my hands i was trying to make a redirect where if any of my hosts type in webmail.* it would automaticaly redirect to https://webmail.myhost.co.za:2096 but for some or other reason it wouldnt work and now when i try to put everything back to the way it was all of it is broken so now when they enter webmail. it redirects to the cgi-sys/default and i cant get it to redirect to the original webmail login page....
httpd.conf :
Code:
ErrorLog "logs/error_log"
ScriptAliasMatch ^/?controlpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?cpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?kpanel/?$ /usr/local/cpanel/cgi-sys/redirect.cgi
ScriptAliasMatch ^/?securecontrolpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
ScriptAliasMatch ^/?securecpanel/?$ /usr/local/cpanel/cgi-sys/sredirect.cgi
ScriptAliasMatch ^/?securewhm/?$ /usr/local/cpanel/cgi-sys/swhmredirect.cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/webmailredirect.pl
ScriptAliasMatch ^/?whm/?$ /usr/local/cpanel/cgi-sys/whmredirect.cgi
ScriptAliasMatch ^/?webmail/?$ /usr/local/cpanel/cgi-sys/wredirect.cgi
RewriteEngine on
AddType text/html .shtml
Alias /bandwidth /usr/local/bandmin/htdocs/
Alias /img-sys /usr/local/cpanel/img-sys/
Alias /java-sys /usr/local/cpanel/java-sys/
Alias /mailman/archives /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /pipermail /usr/local/cpanel/3rdparty/mailman/archives/public/
Alias /sys_cpanel /usr/local/cpanel/sys_cpanel/
ScriptAlias /cgi-sys /usr/local/cpanel/cgi-sys/
ScriptAlias /mailman /usr/local/cpanel/3rdparty/mailman/cgi-bin/
Code:
# CPANEL/WHM/WEBMAIL/WEBDISK/AUTOCONFIG PROXY SUBDOMAINS
<VirtualHost my_ip:80 my_ip:443 127.0.0.1:80 127.0.0.1:443>
ServerName my_server
ServerAlias cpanel.* whm.* webmail.* webdisk.* autodiscover.* autoconfig.*
DocumentRoot /usr/local/apache/htdocs
ServerAdmin my_email
<IfModule mod_suphp.c>
suPHP_UserGroup nobody nobody
</IfModule>
<IfModule mod_security2.c>
SecRuleEngine Off
</IfModule>
UserDir disabled
RewriteEngine On
<IfModule mod_ssl.c>
SSLProxyEngine On
SSLProxyCheckPeerCN Off
SSLProxyCheckPeerName Off
SSLProxyCheckPeerExpire Off
</IfModule>
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2083/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2096/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2087/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteCond %{HTTPS} on
RewriteRule ^/(.*) https://127.0.0.1:2078/$1 [P]
RewriteCond %{HTTP_HOST} ^cpanel\.
RewriteRule ^/(.*) http://127.0.0.1:2082/$1 [P]
RewriteCond %{HTTP_HOST} ^webmail\.
RewriteRule ^/(.*) http://127.0.0.1:2095/$1 [P]
RewriteCond %{HTTP_HOST} ^whm\.
RewriteRule ^/(.*) http://127.0.0.1:2086/$1 [P]
RewriteCond %{HTTP_HOST} ^webdisk\.
RewriteRule ^/(.*) http://127.0.0.1:2077/$1 [P]
RewriteCond %{HTTP_HOST} ^autodiscover\.
RewriteRule ^[^?]*(\?.*)? http://127.0.0.1/cgi-sys/autodiscover.cgi [P]
RewriteCond %{HTTP_HOST} ^autoconfig\.
RewriteRule ^[^?]*(\?.*)? http://127.0.0.1/cgi-sys/autoconfig.cgi [P]
UseCanonicalName Off
</VirtualHost>
Include "/usr/local/apache/conf/includes/post_virtualhost_global.conf"
Include "/usr/local/apache/conf/includes/post_virtualhost_2.conf"
I have remove IP and server name for security reasons... respectively...