LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-28-2007, 11:29 AM   #1
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Rep: Reputation: 15
Apache https virtualhost redirection


Hello,

I have a little problem with my https and http redirection :

My domain name is : toto.fr which point to my external ip 217.110.125.12 (fake)

I have a virtual host and the servername is results.toto.fr

when i type : http://results.toto.fr I want to be redirected to
https://results.toto.fr, but the fact is that i'm redirected to
https://217.110.125.12

So i'm on my website, thats fine, but why there is https://217.110.125.12 instead of https://results.toto.fr?

Thanks a lot guys!
 
Old 11-28-2007, 11:46 AM   #2
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
well you've not even told us what the config is to comment on it...
 
Old 11-28-2007, 02:32 PM   #3
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
What is the value of ServerName in your httpd.conf file? I'm guessing you set it to your IP address instead of results.toto.fr.

HTH

Forrest
 
Old 11-29-2007, 04:55 AM   #4
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Original Poster
Rep: Reputation: 15
I have a lot of virtual hosts, and it works for all of them, except for this one

Here is my Virtual host conf file :

Code:
NameVirtualHost *:447

<VirtualHost *:80>
        DocumentRoot "/home/sites/toto/www"
        ServerName resultats.toto.fr
</VirtualHost>

<VirtualHost *:447>
        DocumentRoot "/home/sites/toto"
        ServerName resultats.toto.fr

        SSLEngine on

        SSLCertificateFile conf/ssl/resultats.toto.fr.cer
        SSLCertificateKeyFile conf/ssl/resultats.toto.fr.key

        ProxyPass / http://127.0.0.1:9030/
        ProxyPassReverse / http://127.0.0.1:9030/
</VirtualHost>

<VirtualHost *:80>
        DocumentRoot "/home/sites/toto"
        ServerName www-prod-toto.toto.priv

        PythonPath "['/home/sis/sites/toto' + sys.path"

        Include /home/sis/code/toto/sis/sisweb/etc/httpd.conf
        PythonOption wsgi.application ini.toto::wsgi_app
</VirtualHost>
http://resultats.toto.fr redirect to https://[ip_adresss]/ instead of
https://resultats.toto.fr

Foresstt, the problem is not in httpd.conf i think, because it s working for all other virtual hosts,

Thanks for help!
 
Old 11-29-2007, 05:32 AM   #5
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985Reputation: 1985
none of that defines a redirect at all. what is actually doing the redirect..? if you're giving back an http 302 response then you're going to be giving the ip address itself, not the name, otherwise the name would be there.
 
Old 11-29-2007, 05:45 AM   #6
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Original Poster
Rep: Reputation: 15
I want to know, how to perform a redirect, and where to do it,
i don't know how it is done for the other website,
that's my question :/

Thanks!
 
Old 11-29-2007, 07:26 AM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
OK, why are you running your https server on 447? It should be 443. Perhaps you are forwarding your http to https, it isn't seeing 443 at that name, so is using the IP.

HTH

Forrest
 
Old 11-29-2007, 07:37 AM   #8
dicou
Member
 
Registered: Apr 2004
Location: Paris
Posts: 44

Original Poster
Rep: Reputation: 15
because i have a range of https port.

Anyway, i think i got this answer,
the fact is, my website is hosted by a f*** hoster,
so he can't let me choose my dns,

thanks all for help!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apache + add a VirtualHost linuxtesting2 Linux - Newbie 2 09-03-2005 03:21 AM
Apache -VirtualHost davidhk Debian 7 08-19-2005 12:33 PM
Help with Apache <VirtualHost> please. smakkythecamel Linux - Networking 2 06-12-2003 07:15 PM
apache virtualhost jonfa Linux - Networking 5 08-12-2002 06:07 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 08:37 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration