Jump to content


Photo

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


  • Please log in to reply
2 replies to this topic

#1 miseleigh

miseleigh
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 25 September 2006 - 05:45 PM

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:

NameVirtualHost *:443
NameVirtualHost *:80

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

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


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!

#2 miseleigh

miseleigh
  • Members
  • PipPipPip
  • Advanced Member
  • 63 posts

Posted 25 September 2006 - 06:15 PM

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.securesi...com/login.php.  Any ideas?

#3 oldmanice

oldmanice
  • Members
  • PipPipPip
  • Advanced Member
  • 134 posts
  • LocationIn Your Garden At Night

Posted 26 September 2006 - 05:29 PM

It should be

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

Your local ip address is requierd for the stars
Join my Froums www.phpbbplanet.com/darkwinter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users