Pages: Previous1234Next
Current Page: 3 of 4
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: oscarml (---.43.189.190.static.user.ono.com)
Date: March 17, 2008 10:11AM

Hi,

Finally I just created a .htaccess file in the folder I want to force https conection with this config:

SSLRequireSSL
ErrorDocument 403 [localhost]


Is there any problem using this?

Thx!

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: bloody velvet (---.nyc.res.rr.com)
Date: March 18, 2008 03:32AM

I don't think so, I haven't done extensive testing with SSL, so I can't sy for sure. The only downside (or upside depending on your intended results) I can see in this way is that anything you access above that folder redirects to the root of https. It seems to work fine if you're already on https, though, so that seems ok.

On the logging side, you'll have 403 errors in your log as opposed to my way where it logs 302's. If I was parsing logs for statistics I'd check out 403's, and feel safe ignoring 302's. Again, it's all in how you want to implement it.

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: pete_ngo (---.stx.res.rr.com)
Date: April 06, 2008 01:06AM

The way to apply SSL to a particular subdirectory I used is modified the httpd-vhosts.conf like that (Redirect)

<VirtualHost *:80>
ServerAdmin admin@localhost
DocumentRoot "C:/wamp/www/"
ServerName MyName:80
ErrorLog "C:/wamp/logs/error.log"
TransferLog "C:/wamp/logs/access.log"
Redirect permanent /SUBDIR [localhost]
</VirtualHost>

However, when enable SSL for my server, any site in the localhost can be accessed in two ways
- _http_://localhost/mysite
- _https_://localhost/mysite

That's also a problem 'cauz what I want to do is everything is accessed through HTTP but only /SUBDIR directory.

Any ideas to help me out?
thanks.



Edited 1 time(s). Last edit at 04/06/2008 01:07AM by pete_ngo.

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: appujgd (---.247.154.246.cochin-static.vsnl.net.in)
Date: April 17, 2008 07:22AM

HTTPS setup was successful... But how can i redirect when i type http in the addr bar to https automatically by this ssl..

Pls help me...

Thanks

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: bloody velvet (---.nyc.res.rr.com)
Date: April 17, 2008 03:03PM

Read the second page in this thread, we've discussed different ways to setup redirecting there. If you have additional questions beyond that, let me know and I'll see if I can answer them.

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: bozocv (---.45.crnagora.net)
Date: August 21, 2008 05:22PM

I found this article very helpful. So I want to help some other people.

If you want to use HTTPS with some files and HTTP with others you can use this PHP code to acomplish that:

if($_SERVER['SERVER_PORT']==80){

header('Location: h**ps://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']);

}

OR

if($_SERVER['SERVER_PORT']==443){

header('Location: h**p://'.$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF']);

}

just replace ** with tt

I did't want to use mod_rewrite (security reasons) and redirect option was not good for me.



Edited 2 time(s). Last edit at 08/21/2008 05:25PM by bozocv.

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: harrycheng (60.54.55.---)
Date: August 26, 2008 06:58AM

Hi toivo,

I have did until the openssl req -new > webserver.csr step but the command line show me errors as below:

D:\wamp\Apache2\bin>openssl req -new > webserver.csr
'openssl' is not recognized as an internal or external command,
operable program or batch file.

but in the bun folder i saw webserver.csr file created. when i open it was blank.

appreciate if someone can help. I'm using win xp OS. Thanks!

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: toivo (---.nsw.bigpond.net.au)
Date: August 26, 2008 10:11AM

Hi Harry,

The testing for the step by step guide on page 1 at [forum.wampserver.com] was done in WAMP5. Therefore you will need to change at least the folders for WAMP2, for example the openssl.exe can be found in c:\wamp\bin\apache\apache2.2.8\bin.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: harrycheng (---.177.48.60.brk02-home.tm.net.my)
Date: August 26, 2008 02:23PM

Hi toivo,

Thanks for your quick reply. Actually i'm using WAMP5 Version 1.6.6. I can see any folder c:\wamp\bin\apache\apache2.2.8\bin. What i had is D:\wamp\Apache2\bin. Do I need to download the WAMP2?

Thanks & regards,
Harry

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: toivo (---.nsw.bigpond.net.au)
Date: August 26, 2008 02:28PM

Hi Harry,

In that case you should be able to use the paths in the guide. If you want to upgrade, you will need to do database backups and then a clean install, which you may want to test it first if you are working on a production server.

Regards,

toivo
Sydney, Australia

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: harrycheng (---.177.48.60.brk02-home.tm.net.my)
Date: August 26, 2008 02:41PM

hi toivo,

You mentioned "In that case you should be able to use the paths in the guide", which guide I should refer to? Any manual to guide step by step? Hopefully I wouldn't trouble you so much.

Because i followed your guide until,

["Again in the command prompt, go to C:\wamp\Apache2\bin and run the following command:

openssl req -new > webserver.csr (UNABLE TO CONTINUE............)

The command runs and prompts you to enter a PEM pass phrase and verify it. Write down the phrase because you will need it later. "]

Really thanks a lot for your help......

Thanks & regards,
Harry

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: harrycheng (---.177.48.60.brk02-home.tm.net.my)
Date: August 26, 2008 02:57PM

hi toivo,

i have tried to download wamp2 and install in my another notebook, then copy the apache2.2.2 bin files into my wamp5 in my notebook. Then try again the step, error found as below.

Windows Alert!
[openssl.exe - Ordinal Not Found

The ordinal 286 could not be located in the dynamic link library SSLEAY32.dll]

Any idea?

Thanks & regards,
Harry

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: eightballfreek (82.110.254.---)
Date: September 09, 2008 11:59AM

Hi guys,

Just followed Toivo's excellent instructions to the letter. Everything starts up fine, but when I try to connect to h**ps://localhost/mysite.co.uk/ I get a 403 Forbidden notice. Visiting the site *without* the https (i.e. h**p://localhost/mysite.co.uk) works perfectly.

What might be the cause of this?

*** EDIT ***

Please excuse my idiocy. I rechecked my httpd-ssl.conf file in /yourPathTo/apache2.2.8/conf/extra/ and found that I hadn't changed the DocumentRoot directive. I changed it from some default Program Files/Apache/ weirdness to "C:/wamp/www" (no trailing slash) and now everything works perfectly.

I am humbled by the off-the-hook excellence I've seen on this forum, from Toivo in particular. Nice job everyone. This rocks.

Kind regards,


J



Edited 1 time(s). Last edit at 09/09/2008 12:23PM by eightballfreek.

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: huvanile (---.dsl.rcsntx.swbell.net)
Date: November 02, 2008 10:10PM

So this question may have already been answered in part by Toivo and others, but I've consolidated the pointers from this and other threads around the net into a detailed tutorial on getting HTTPS running on WAMPServer. I hope it saves someone the hours and hours I had to spend figuring it all out!

[huvanile.com]

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: djdubuque (---.dc.dc.cox.net)
Date: December 12, 2008 07:20PM

The instructions given here seem to be out of date, if I add the line;

<IfModule ssl_module>
SSLRandomSeed startup builtin
SSLRandomSeed connect builtin
Include conf/extra/httpd-ssl.conf
</IfModule>

My sever will not start, but if I remove the line ; Include conf/extra/httpd-ssl.conf it will start.

Also, my apache is not on the root of Wamp it is in bin/apache/apache2.2.10

Variable name: OPENSSL_CONF
Variable value: c:\wamp\Apache2\conf\openssl.cnf

I placed mine as so:
Variable name: OPENSSL_CONF
Variable value: c:\wamp\bin\apache\apache2.2.10\bin\conf\openssl.cnf

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: redcoder (---.as43234.net)
Date: June 28, 2009 04:39PM

Hi, I am glad to hear someone got WAMP 5 installed with SSL, but unfortunately my WAMP 5 is installing properly. I got this error message in DOS when I type :
openssl req -new > new.cert.csr

1692:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c:
126:fopen('d:/test/openssl098kvc6/openssl.cnf','rb')
1692:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c
:131:
1692:error:0E078002:configuration file routinesgrinning smileyEF_LOAD:system lib:.\crypto\con
f\conf_def.c:199:

Any idea ?
Why it goes to d: ? is that mean it require partition d: ?

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: yfastud (Moderator)
Date: June 29, 2009 05:32AM


Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: redcoder (---.as43234.net)
Date: June 30, 2009 08:26PM

Hi JLBN,

Thanks for the link.. I did follow the instruction from there , but getting the same error at Step 3...

C:\wamp\bin\apache\Apache2.2.11\bin>openssl genrsa -aes256 -out pass.key 2048
3296:error:02001015:system library:fopen:Is a directory:.\crypto\bio\bss_file.c:
126:fopen('d:/test/openssl098kvc6/openssl.cnf','rb')
3296:error:2006D002:BIO routines:BIO_new_file:system lib:.\crypto\bio\bss_file.c
:131:
3296:error:0E078002:configuration file routinesgrinning smileyEF_LOAD:system lib:.\crypto\con
f\conf_def.c:199:

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: vynnus (---.xd-dynamic.ctbcnetsuper.com.br)
Date: July 12, 2009 07:19AM

I'm facing the same issue above.
Do you have any solution for this error JLBN ?

Thanks mate

Options: ReplyQuote
Re: HTTPS or SSL - Breaks WAMP Server
Posted by: yfastud (Moderator)
Date: July 12, 2009 04:35PM

vynnus, you should check comments there for more info winking smiley

Have fun,

FREE One A Day
FREE Photo
FREE Games
FREE Websites
FREE Portable GPS
FREE WAMP Guides

Options: ReplyQuote
Pages: Previous1234Next
Current Page: 3 of 4


Sorry, only registered users may post in this forum.