Jump to content

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


miseleigh

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!
Link to comment
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?
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.