| Linux - Server This forum is for the discussion of Linux Software used in a server related context. |
| Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
 |
GNU/Linux Basic Guide
This 255-page guide will provide you with the keys to understand the philosophy of free software, teach you how to use and handle it, and give you the tools required to move easily in the world of GNU/Linux. Many users and administrators will be taking their first steps with this GNU/Linux Basic guide and it will show you how to approach and solve the problems you encounter.
Click Here to receive this Complete Guide absolutely free. |
|
 |
11-28-2007, 11:29 AM
|
#1
|
|
Member
Registered: Apr 2004
Location: Paris
Posts: 44
Rep:
|
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!
|
|
|
|
11-28-2007, 11:46 AM
|
#2
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,706
|
well you've not even told us what the config is to comment on it...
|
|
|
|
11-28-2007, 02:32 PM
|
#3
|
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
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
|
|
|
|
11-29-2007, 04:55 AM
|
#4
|
|
Member
Registered: Apr 2004
Location: Paris
Posts: 44
Original Poster
Rep:
|
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!
|
|
|
|
11-29-2007, 05:32 AM
|
#5
|
|
Moderator
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 42,706
|
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.
|
|
|
|
11-29-2007, 05:45 AM
|
#6
|
|
Member
Registered: Apr 2004
Location: Paris
Posts: 44
Original Poster
Rep:
|
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!
|
|
|
|
11-29-2007, 07:26 AM
|
#7
|
|
Senior Member
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288
Rep:
|
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
|
|
|
|
11-29-2007, 07:37 AM
|
#8
|
|
Member
Registered: Apr 2004
Location: Paris
Posts: 44
Original Poster
Rep:
|
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!
|
|
|
|
| Thread Tools |
Search this Thread |
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -5. The time now is 05:40 AM.
|
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|