LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   SSL redirect issue in confluence (https://www.linuxquestions.org/questions/linux-server-73/ssl-redirect-issue-in-confluence-4175446717/)

vignesh4sh 01-22-2013 04:41 AM

SSL redirect issue in confluence
 
Hi,
I have Installed Jira and confluence and configured Vhost like example.com and testexample.com with ssl.
When i hit testexample.com it directs to example.com.
example.com VHOST:
Quote:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin webmaster@localhost
ServerName example.com
# DocumentRoot /var/www/example/public/
Options Indexes FollowSymLinks

SSLEngine On
SSLCertificateFile /var/www/example/ssl/example.crt
SSLCertificateKeyFile /var/www/example/ssl/example.key
SetEnvIf User-Agent ".MSIE.*" nokeepalive ssl-unclean-shutdown
SSLVerifyClient None
<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://example.com:7170/
ProxyPassReverse / http://example.com:7170/
ErrorLog /var/www/example/logs/error.log
# alert, emerg.
LogLevel warn
CustomLog /var/www/example/logs/ssl_access.log combined
</VirtualHost>
This is testexample.com
Quote:

<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerAdmin example.com
ServerName example.com
DocumentRoot /var/www/example/public/
Options Indexes FollowSymLinks

SSLEngine On
SSLCertificateFile /var/www/testexample/ssl/testexample.crt
SSLCertificateKeyFile /var/www/testexample/ssl/testexample.key
SetEnvIf User-Agent ".MSIE.*" nokeepalive ssl-unclean-shutdown
SSLVerifyClient None

<Proxy *>
Order deny,allow
Allow from all
</Proxy>
SSLProxyEngine On
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://testexample:7370/
ProxyPassReverse / http://testexample:7370/
ErrorLog /var/www/testexample/logs/error.log
LogLevel warn
CustomLog /var/www/testexample/logs/ssl_access.log combined
</virtualhost>
When I hit example.com it works fine.
when i hit testexample.com it redirects to example.com.

please suggest me any idea.I have stucked in this conf.

thanks

bathory 01-23-2013 04:22 PM

Quote:

ProxyPass / http://testexample:7370/
ProxyPassReverse / http://testexample:7370/
Note that both vhosts have the same ServerName (ServerName example.com)
Also make sure that your server can resolve the host testexample (not a FQDN), or use its IP address instead

Regards

vignesh4sh 01-24-2013 04:28 AM

Thanks for reply.
I have changed the server name and proxy configuration is also righty. But, still i getting the same issue.
when i hit example.com it redirects to testexample.com

This is my apache Error log
[Tue Jan 22 07:15:36 2013] [error] [client ] File does not exist: /var/www/testexample/public/rest, referer: http://testexample.com/display/CDM/CDM+Home
[Tue Jan 22 07:16:35 2013] [error] [client 182.72.26.22] File does not exist: /var/www/testexample/public/rest, referer: http://testexample/display/CDM/CDM+Home

Please give me suggestions.

Thanks

bathory 01-24-2013 06:00 AM

Quote:

I have changed the server name and proxy configuration is also righty. But, still i getting the same issue.
when i hit example.com it redirects to testexample.com
I guess you mean the other way around, i.e sending to testexample.com goes to example.com.
You didn't mention your distro, but if it's ubuntu like in your profile image, you should use a2ensite to enable the 2nd vhost. To verify the vhosts run:
Code:

apachectl -S


All times are GMT -5. The time now is 11:26 AM.