Jump to content

Archived

This topic is now archived and is closed to further replies.

miseleigh

Apache Vhost: 1 ssl domain, one not, but it's not working

Recommended Posts

Hi,

I am trying to set up two websites using vhosts in Apache, one that uses SSL and one that doesn't.  All I've done is try to get anything coming in on port 443 to go to my ssl site, and anything on port 80 to go to the other (which I am going to change at some point, but I'd like to get this working first.)  Relevant part of my httpd.conf:

[quote]NameVirtualHost *:443
NameVirtualHost *:80

<VirtualHost *:80>
  ServerName www.notsecuresite.com
  DocumentRoot htdocs/notsecuresite
</VirtualHost>

<VirtualHost *:443>
  ServerName www.securesite.com
  DocumentRoot htdocs
</VirtualHost>[/quote]

I cannot reach notsecuresite.com - it just gives me a 404 - The requested URL notsecuresite.com/index.html was not found on this server.

There are a few things I can think of that may be causing this.  I have read in several places that SSL does not work with virtual hosting, but I also read that it will if there is only one SSL site.  I also saw (once) that there could be a problem if the websites don't all have their own folders, but I have not found any confirmation of this.  Any help would be greatly appreciated.

Note:  Both sites worked with the full paths before I tried vhosts.

Thanks!

Share this post


Link to post
Share on other sites
Update:  I can now reach the index pages of both sites.  I had a problem with the actual url I was trying to access.  However, the form on my ssl site does not submit - the submit button causes an error in Firefox that says 'Redirection limit for this URl exceeded.  Unable to load the requested page.  This may be caused by cookies that are blocked.'  Except that cookies are not blocked.  The page is trying to submit to https://www.securesite.com/login.php.  Any ideas?

Share this post


Link to post
Share on other sites
It should be

<VirtualHost*>
  ServerName securesite.com
  DocumentRoot htdocs
  ServerAnalis www.securesite.com
</VirtualHost>

Your local ip address is requierd for the stars

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.