Web Server Configuration
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignWeb Server Configuration

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old December 16th, 2002, 07:17 PM
mytch mytch is offline
Dev Articles Novice (500 - 999 posts)
 
Join Date: Apr 2002
Location: Sydney, Australia
Posts: 589 mytch User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Article Discussion: Installing Apache With SSL: The Complete Guide

Installing Apache With SSL: The Complete Guide If you have any questions or comments about this article then please post them here.

You can read the article here .

Reply With Quote
  #2  
Old December 20th, 2002, 11:42 PM
confuxion confuxion is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Burlington, VT
Posts: 28 confuxion User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
security concerns

This solution sounds great and the article laid things out nicely. I'm left with concerns about security, however, among other things:

- Using this scenario for a testing platform, is there any obvious security concerns to be aware of, especially considering the server will be automatically running at all times in the background?

- Must IIS merely be stopped to make Apache stand as the default server, or does it have to be uninstalled altogether?

That's all I can think of for now. Thanks for the useful article!

Reply With Quote
  #3  
Old December 21st, 2002, 03:27 AM
NZ Joe NZ Joe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Kapiti, New Zealand
Posts: 7 NZ Joe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Multiple virtual hosts

I have managed to get it all set up and running OK with named virtual host over http. However, I am having problems with getting them to work over https. When I set a virtual host name, it always serves the first listed domain. See settings below. https:artbeatdev serves the correct folder, but https:localhost serves artbeatdev's documents

my settings:

<VirtualHost *:443>

DocumentRoot "C:/Development/artbeat"
ServerName artbeatdev
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLEngine on.......etc
</VirtualHost>

<VirtualHost *:443>

DocumentRoot "C:/Development"
ServerName localhost
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on.....etc

Reply With Quote
  #4  
Old December 21st, 2002, 04:31 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Re: security concerns

Quote:
Originally posted by confuxion
This solution sounds great and the article laid things out nicely. I'm left with concerns about security, however, among other things:

- Using this scenario for a testing platform, is there any obvious security concerns to be aware of, especially considering the server will be automatically running at all times in the background?

- Must IIS merely be stopped to make Apache stand as the default server, or does it have to be uninstalled altogether?

That's all I can think of for now. Thanks for the useful article!



you can keep iis installed as well apache. just change the port number to something other than 80 in apache or iis, if you plan to run them at the same time.
__________________
Apache Expert

Reply With Quote
  #5  
Old December 21st, 2002, 04:57 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Re: Multiple virtual hosts

Quote:
Originally posted by NZ Joe
I have managed to get it all set up and running OK with named virtual host over http. However, I am having problems with getting them to work over https. When I set a virtual host name, it always serves the first listed domain. See settings below. https:artbeatdev serves the correct folder, but https:localhost serves artbeatdev's documents

my settings:

<VirtualHost *:443>

DocumentRoot "C:/Development/artbeat"
ServerName artbeatdev
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

SSLEngine on.......etc
</VirtualHost>

<VirtualHost *:443>

DocumentRoot "C:/Development"
ServerName localhost
ServerAdmin webmaster@localhost
ErrorLog logs/ssl/error.log
TransferLog logs/ssl/access.log

# SSL Engine Switch:
# Enable/Disable SSL for this virtual host.
SSLEngine on.....etc


DocumentRoot "C:/Development/artbeat"
DocumentRoot "C:/Development"

your problem is you need to set it to one folder, so just put in DocumentRoot "C:/Development "
save it restart your server and it should be working fine.

i'm the author of this article i've tried the method out like a million times so i know it works.

Reply With Quote
  #6  
Old December 21st, 2002, 01:27 PM
NZ Joe NZ Joe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Kapiti, New Zealand
Posts: 7 NZ Joe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
I tried that. all that does is serve "c:/development" to both domains. I want it to use a different root folder for the different domain. I.E. generic https://localhost serves "c:/development", https://host1 serves "c:/development/host1files", https://host2 serves "c:/development/host2files" etc.

I get the following message in the event viewer - "The Apache service named C:\OpenSA\Apache\Apache.exe reported the following error:
>>> [Sun Dec 22 07:14:25 2002] [warn] _default_ VirtualHost overlap on port 443, the first has precedence <<<
before the error.log file could be opened.
More information may be available in the error.log file. . "

Error log - "[Sun Dec 22 07:28:36 2002] [warn] _default_ VirtualHost overlap on port 443, the first has precedence"

Reply With Quote
  #7  
Old December 21st, 2002, 05:15 PM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Quote:
Originally posted by NZ Joe
I tried that. all that does is serve "c:/development" to both domains. I want it to use a different root folder for the different domain. I.E. generic https://localhost serves "c:/development", https://host1 serves "c:/development/host1files", https://host2 serves "c:/development/host2files" etc.

I get the following message in the event viewer - "The Apache service named C:\OpenSA\Apache\Apache.exe reported the following error:
>>> [Sun Dec 22 07:14:25 2002] [warn] _default_ VirtualHost overlap on port 443, the first has precedence <<<
before the error.log file could be opened.
More information may be available in the error.log file. . "

Error log - "[Sun Dec 22 07:28:36 2002] [warn] _default_ VirtualHost overlap on port 443, the first has precedence"



what operating system do you have? also may i ask, why do you want to use two diffrent folders, to serve your content just wondering.

Reply With Quote
  #8  
Old December 21st, 2002, 06:19 PM
NZ Joe NZ Joe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Kapiti, New Zealand
Posts: 7 NZ Joe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
OS=win2k

I use different folders for different sites that I am developing. Using a virtual host for each one allows me to make all of my URLs root-relative, so that my templates work however far up the tree they my documents go.

I have managed to get it to work using different ports (i.e. localhost at https://localhost:443 and artbeatdev at https://artbeatdev:444) If I can't get it to work through the default port, I'll try and use mod_rewrite to automatically switch ports for me (I don't know if that's possible, but I'll try)

Last edited by NZ Joe : December 21st, 2002 at 06:30 PM.

Reply With Quote
  #9  
Old December 22nd, 2002, 07:14 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Quote:
Originally posted by NZ Joe
OS=win2k

I use different folders for different sites that I am developing. Using a virtual host for each one allows me to make all of my URLs root-relative, so that my templates work however far up the tree they my documents go.

I have managed to get it to work using different ports (i.e. localhost at https://localhost:443 and artbeatdev at https://artbeatdev:444) If I can't get it to work through the default port, I'll try and use mod_rewrite to automatically switch ports for me (I don't know if that's possible, but I'll try)



so let me get this right, you are using iis to serve one of your test sites and apache for the other one?

also you shouldn't have to type in the :443 just https://artbeatdev/ on the 444 on you'll have to put that there.

also the port i was referring to was port 80 since, apache and iis run on that port, so change one of them to 81 or whatever to suit your needs.

Reply With Quote
  #10  
Old December 22nd, 2002, 01:36 PM
NZ Joe NZ Joe is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Location: Kapiti, New Zealand
Posts: 7 NZ Joe User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
so let me get this right, you are using iis to serve one of your test sites and apache for the other one?
NO, I'm using apache for both

Quote:
also you shouldn't have to type in the :443
I Know, that was just for illustration.

I am running apache as my server. I have set up the virtual host to work for multiple domains to work over http (e.g. http://localhost, http://artbeatdev etc)

What I want is to set them up so that they also work over https (e.g. https://localhost, https://artbeatdev etc)

I can't get this to work. However, if I set the different secure virtual hosts on different ports (and listen to that port) it works

<VirtualHost *:443>

DocumentRoot "C:/Development/artbeat"
ServerName artbeatdev
....etc
</VirtualHost>

<VirtualHost *:444>

DocumentRoot "C:/Development"
ServerName localhost
....etc
</VirtualHost>

As a work-around, so that i don't have the put the port number on the end all the time I am going to try to use mod_rewrite to do it for me

Reply With Quote
  #11  
Old January 12th, 2003, 06:29 PM
jalalabad jalalabad is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 jalalabad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Removing IfDefine SSL breaks Apache

Your advice for starting SSL with the Apache service works on my Windows XP machine, but on the Windows 2000 Advanced Server, it prevents Apache from starting.

I get a little error/dialog box that says:

Could not start Apache service on Local Computer.
The service did not return an error. This could be an internal Windows error or an internal service error.
If the problem persists, contact your system administrator.
Attached Images
File Type: gif error.gif (2.8 KB, 590 views)

Reply With Quote
  #12  
Old January 13th, 2003, 01:24 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Re: Removing IfDefine SSL breaks Apache

Quote:
Originally posted by jalalabad
Your advice for starting SSL with the Apache service works on my Windows XP machine, but on the Windows 2000 Advanced Server, it prevents Apache from starting.

I get a little error/dialog box that says:

Could not start Apache service on Local Computer.
The service did not return an error. This could be an internal Windows error or an internal service error.
If the problem persists, contact your system administrator.



i have windows 2k advaned server as well and i didn't get that error at all.

Reply With Quote
  #13  
Old January 13th, 2003, 01:30 AM
jalalabad jalalabad is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 jalalabad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Re: Removing IfDefine SSL breaks Apache

Quote:
Originally posted by asp_man



i have windows 2k advaned server as well and i didn't get that error at all.


I found the searchable OpenSA mailing list archives (finally), and the answer was to remove ALL of the <If SSL> type container tags in the httpd.conf file.

Also, if you don't have the problems I had, you can leave the httpd.conf file alone altogether and install a separate service for Apache-SSL with:

C:\Apache\Apache -i -n "Apache-SSL" -D SSL

Matt

Reply With Quote
  #14  
Old January 13th, 2003, 04:03 AM
infamous-online infamous-online is offline
Moderator
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2002
Posts: 404 infamous-online User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 1 Day 24 m 44 sec
Reputation Power: 7
Talking Re: Re: Re: Removing IfDefine SSL breaks Apache

Quote:
Originally posted by jalalabad


I found the searchable OpenSA mailing list archives (finally), and the answer was to remove ALL of the <If SSL> type container tags in the httpd.conf file.

Also, if you don't have the problems I had, you can leave the httpd.conf file alone altogether and install a separate service for Apache-SSL with:

C:\Apache\Apache -i -n "Apache-SSL" -D SSL

Matt



lol if you read my article it would have told you to remove the <if ssl > in the conf file.

Reply With Quote
  #15  
Old January 13th, 2003, 01:09 PM
jalalabad jalalabad is offline
Junior Member
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2003
Posts: 3 jalalabad User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Re: Re: Re: Re: Removing IfDefine SSL breaks Apache

Quote:
Originally posted by asp_man



lol if you read my article it would have told you to remove the <if ssl > in the conf file.


I read your article word for word. It says to remove only the one <IfDefine SSL> container surrounding the "LoadModule ssl_module modules/mod_ssl.so" statement.

For some reason, to make it work on Win 2k Server, I had to remove ALL of the SSL conditional container tags in the .conf file. That is, I removed the <IfDefine SSL> you mentioned and then two more <IfModule mod_ssl.c> container tag pairs.

I found the solution in the searchable OpenSA mailing-list archive: URL

Neither the OpenSA site or the Mail-Archive site have links to this searchable archive, so make note of that link.

Matt

Reply With Quote
  #16